diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-08-04 08:07:44 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-08-04 08:07:44 +0000 |
commit | be551e6a00af45400d12b494dce6ba11f30d3121 (patch) | |
tree | 290f356a10641d85e0fb93648e86337cc5e5b526 /ares_init.c | |
parent | ebcf14a69b2efd96afd93bf0c6926dcb2c363a53 (diff) | |
download | c-ares-be551e6a00af45400d12b494dce6ba11f30d3121.tar.gz c-ares-be551e6a00af45400d12b494dce6ba11f30d3121.tar.bz2 c-ares-be551e6a00af45400d12b494dce6ba11f30d3121.zip |
killed trailing whitespace, narrowed a few lines to 80 cols
Diffstat (limited to 'ares_init.c')
-rw-r--r-- | ares_init.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ares_init.c b/ares_init.c index 05c65d9..b78c927 100644 --- a/ares_init.c +++ b/ares_init.c @@ -843,7 +843,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, while (*q && *q != '/' && *q != ';' && !isspace((unsigned char)*q)) q++; memcpy(ipbuf, str, (int)(q-str)); - ipbuf[(int)(q-str)] = 0; + ipbuf[(int)(q-str)] = 0; /* Find the prefix */ if (*q == '/') { @@ -858,7 +858,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, ipbufpfx[0] = 0; /* Lets see if it is CIDR */ /* First we'll try IPv6 */ - if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx ? ipbufpfx : ipbuf, &pat.addr.addr6, + if ((bits = ares_inet_net_pton(AF_INET6, ipbufpfx ? ipbufpfx : ipbuf, + &pat.addr.addr6, sizeof(pat.addr.addr6))) > 0) { pat.type = PATTERN_CIDR; @@ -867,8 +868,8 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, if (!sortlist_alloc(sortlist, nsort, &pat)) return ARES_ENOMEM; } - if (ipbufpfx && - (bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4, + if (ipbufpfx && + (bits = ares_inet_net_pton(AF_INET, ipbufpfx, &pat.addr.addr4, sizeof(pat.addr.addr4))) > 0) { pat.type = PATTERN_CIDR; @@ -890,7 +891,7 @@ static int config_sortlist(struct apattern **sortlist, int *nsort, else natural_mask(&pat); pat.family = AF_INET; - pat.type = PATTERN_MASK; + pat.type = PATTERN_MASK; if (!sortlist_alloc(sortlist, nsort, &pat)) return ARES_ENOMEM; } @@ -1011,7 +1012,8 @@ static const char *try_option(const char *p, const char *q, const char *opt) } #ifndef WIN32 -static int sortlist_alloc(struct apattern **sortlist, int *nsort, struct apattern *pat) +static int sortlist_alloc(struct apattern **sortlist, int *nsort, + struct apattern *pat) { struct apattern *newsort; newsort = realloc(*sortlist, (*nsort + 1) * sizeof(struct apattern)); |