From fc281d6440e239c8fceb3831764ccbb9bad027b5 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 18 Aug 2005 08:48:31 +0000 Subject: [PATCH] detabified --- ares/ares.h | 34 +++++++++++++++++----------------- ares/ares_gethostbyaddr.c | 4 ++-- ares/ares_gethostbyname.c | 14 +++++++------- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ares/ares.h b/ares/ares.h index 01a6b8ac3..4fca9865b 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -67,7 +67,7 @@ extern "C" { #define ARES_EBADSTR 17 /* ares_getnameinfo error codes */ -#define ARES_EBADFLAGS 18 +#define ARES_EBADFLAGS 18 /* Flag values */ #define ARES_FLAG_USEVC (1 << 0) @@ -91,22 +91,22 @@ extern "C" { #define ARES_OPT_LOOKUPS (1 << 8) /* Nameinfo flag values */ -#define ARES_NI_NOFQDN (1 << 0) -#define ARES_NI_NUMERICHOST (1 << 1) -#define ARES_NI_NAMEREQD (1 << 2) -#define ARES_NI_NUMERICSERV (1 << 3) -#define ARES_NI_DGRAM (1 << 4) -#define ARES_NI_TCP 0 -#define ARES_NI_UDP ARES_NI_DGRAM -#define ARES_NI_SCTP (1 << 5) -#define ARES_NI_DCCP (1 << 6) -#define ARES_NI_NUMERICSCOPE (1 << 7) -#define ARES_NI_LOOKUPHOST (1 << 8) -#define ARES_NI_LOOKUPSERVICE (1 << 9) +#define ARES_NI_NOFQDN (1 << 0) +#define ARES_NI_NUMERICHOST (1 << 1) +#define ARES_NI_NAMEREQD (1 << 2) +#define ARES_NI_NUMERICSERV (1 << 3) +#define ARES_NI_DGRAM (1 << 4) +#define ARES_NI_TCP 0 +#define ARES_NI_UDP ARES_NI_DGRAM +#define ARES_NI_SCTP (1 << 5) +#define ARES_NI_DCCP (1 << 6) +#define ARES_NI_NUMERICSCOPE (1 << 7) +#define ARES_NI_LOOKUPHOST (1 << 8) +#define ARES_NI_LOOKUPSERVICE (1 << 9) /* Reserved for future use */ -#define ARES_NI_IDN (1 << 10) -#define ARES_NI_ALLOW_UNASSIGNED (1 << 11) -#define ARES_NI_USE_STD3_ASCII_RULES (1 << 12) +#define ARES_NI_IDN (1 << 10) +#define ARES_NI_ALLOW_UNASSIGNED (1 << 11) +#define ARES_NI_USE_STD3_ASCII_RULES (1 << 12) struct ares_options { int flags; @@ -150,7 +150,7 @@ void ares_gethostbyname(ares_channel channel, const char *name, int family, void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen, int family, ares_host_callback callback, void *arg); void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, - socklen_t salen, int flags, ares_nameinfo_callback callback, + socklen_t salen, int flags, ares_nameinfo_callback callback, void *arg); int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds); struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, diff --git a/ares/ares_gethostbyaddr.c b/ares/ares_gethostbyaddr.c index a415e36db..edf0db551 100644 --- a/ares/ares_gethostbyaddr.c +++ b/ares/ares_gethostbyaddr.c @@ -68,7 +68,7 @@ void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen, return; } - if ((family == AF_INET && addrlen != sizeof(struct in_addr)) || + if ((family == AF_INET && addrlen != sizeof(struct in_addr)) || (family == AF_INET6 && addrlen != sizeof(struct in6_addr))) { callback(arg, ARES_ENOTIMP, NULL); @@ -107,7 +107,7 @@ static void next_lookup(struct addr_query *aquery) switch (*p) { case 'b': - if (aquery->family == AF_INET) + if (aquery->family == AF_INET) { addr = ntohl(aquery->addr.addr4.s_addr); a1 = (int)((addr >> 24) & 0xff); diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c index b5867fdcd..bdc902974 100644 --- a/ares/ares_gethostbyname.c +++ b/ares/ares_gethostbyname.c @@ -124,10 +124,10 @@ static void next_lookup(struct host_query *hquery) case 'b': /* DNS lookup */ hquery->remaining_lookups = p + 1; - if (hquery->family == AF_INET6) - ares_search(hquery->channel, hquery->name, C_IN, T_AAAA, host_callback, - hquery); - else + if (hquery->family == AF_INET6) + ares_search(hquery->channel, hquery->name, C_IN, T_AAAA, host_callback, + hquery); + else ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, hquery); return; @@ -174,7 +174,7 @@ static void host_callback(void *arg, int status, unsigned char *abuf, int alen) hquery->family = AF_INET; ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback, hquery); - } + } else if (status == ARES_EDESTRUCTION) end_hquery(hquery, status, NULL); else @@ -342,13 +342,13 @@ static int get_address_index(struct in_addr *addr, struct apattern *sortlist, continue; if (sortlist[i].type == PATTERN_MASK) { - if ((addr->s_addr & sortlist[i].mask.addr.addr4.s_addr) + if ((addr->s_addr & sortlist[i].mask.addr.addr4.s_addr) == sortlist[i].addr.addr4.s_addr) break; } else { - if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addr.addr4.s_addr, + if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addr.addr4.s_addr, sortlist[i].mask.bits)) break; }