Replace custom isc_u?intNN_t types with C99 u?intNN_t types

This commit is contained in:
Ondřej Surý
2018-03-28 14:19:37 +02:00
parent 055278c936
commit cb6a185c69
390 changed files with 2812 additions and 2528 deletions

View File

@@ -13,6 +13,7 @@
#include <config.h>
#include <inttypes.h>
#include <stdlib.h>
#include <isc/string.h>
@@ -21,14 +22,14 @@
#include <isc/result.h>
isc_result_t
isc_netscope_pton(int af, char *scopename, void *addr, isc_uint32_t *zoneid) {
isc_netscope_pton(int af, char *scopename, void *addr, uint32_t *zoneid) {
char *ep;
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX
unsigned int ifid;
struct in6_addr *in6;
#endif
isc_uint32_t zone;
isc_uint64_t llz;
uint32_t zone;
uint64_t llz;
/* at this moment, we only support AF_INET6 */
if (af != AF_INET6)
@@ -46,7 +47,7 @@ isc_netscope_pton(int af, char *scopename, void *addr, isc_uint32_t *zoneid) {
in6 = (struct in6_addr *)addr;
if (IN6_IS_ADDR_LINKLOCAL(in6) &&
(ifid = if_nametoindex((const char *)scopename)) != 0)
zone = (isc_uint32_t)ifid;
zone = (uint32_t)ifid;
else {
#endif
llz = strtoull(scopename, &ep, 10);
@@ -54,7 +55,7 @@ isc_netscope_pton(int af, char *scopename, void *addr, isc_uint32_t *zoneid) {
return (ISC_R_FAILURE);
/* check overflow */
zone = (isc_uint32_t)(llz & 0xffffffffUL);
zone = (uint32_t)(llz & 0xffffffffUL);
if (zone != llz)
return (ISC_R_FAILURE);
#ifdef ISC_PLATFORM_HAVEIFNAMETOINDEX