diff options
Diffstat (limited to 'libs/libcurl/src/noproxy.c')
-rw-r--r-- | libs/libcurl/src/noproxy.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libs/libcurl/src/noproxy.c b/libs/libcurl/src/noproxy.c index ab2a210b7b..9ba35e8780 100644 --- a/libs/libcurl/src/noproxy.c +++ b/libs/libcurl/src/noproxy.c @@ -29,6 +29,7 @@ #include "inet_pton.h"
#include "strcase.h"
#include "noproxy.h"
+#include "strparse.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
@@ -53,9 +54,9 @@ UNITTEST bool Curl_cidr4_match(const char *ipv4, /* 1.2.3.4 address */ /* strange input */
return FALSE;
- if(1 != Curl_inet_pton(AF_INET, ipv4, &address))
+ if(1 != curlx_inet_pton(AF_INET, ipv4, &address))
return FALSE;
- if(1 != Curl_inet_pton(AF_INET, network, &check))
+ if(1 != curlx_inet_pton(AF_INET, network, &check))
return FALSE;
if(bits && (bits != 32)) {
@@ -91,9 +92,9 @@ UNITTEST bool Curl_cidr6_match(const char *ipv6, rest = bits & 0x07;
if((bytes > 16) || ((bytes == 16) && rest))
return FALSE;
- if(1 != Curl_inet_pton(AF_INET6, ipv6, address))
+ if(1 != curlx_inet_pton(AF_INET6, ipv6, address))
return FALSE;
- if(1 != Curl_inet_pton(AF_INET6, network, check))
+ if(1 != curlx_inet_pton(AF_INET6, network, check))
return FALSE;
if(bytes && memcmp(address, check, bytes))
return FALSE;
@@ -162,7 +163,7 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy) else {
unsigned int address;
namelen = strlen(name);
- if(1 == Curl_inet_pton(AF_INET, name, &address))
+ if(1 == curlx_inet_pton(AF_INET, name, &address))
type = TYPE_IPV4;
else {
/* ignore trailing dots in the hostname */
@@ -177,8 +178,7 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy) bool match = FALSE;
/* pass blanks */
- while(*p && ISBLANK(*p))
- p++;
+ Curl_str_passblanks(&p);
token = p;
/* pass over the pattern */
@@ -247,8 +247,7 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy) return TRUE;
} /* if(tokenlen) */
/* pass blanks after pattern */
- while(ISBLANK(*p))
- p++;
+ Curl_str_passblanks(&p);
/* if not a comma, this ends the loop */
if(*p != ',')
break;
|