summaryrefslogtreecommitdiff
path: root/lib/if2ip.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-09-30 17:15:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 08:46:35 +0100
commit502acba2af821391b85a2cd4ac7b91ad8e9d4180 (patch)
treee219be1178db413bffd92033e965c1e1075c4702 /lib/if2ip.c
parent1833a45dde4d27febfce42813699533b1ae993d1 (diff)
downloadgnurl-502acba2af821391b85a2cd4ac7b91ad8e9d4180.tar.gz
gnurl-502acba2af821391b85a2cd4ac7b91ad8e9d4180.tar.bz2
gnurl-502acba2af821391b85a2cd4ac7b91ad8e9d4180.zip
strcasecompare: is the new name for strequal()
... to make it less likely that we forget that the function actually does case insentive compares. Also replaced several invokes of the function with a plain strcmp when case sensitivity is not an issue (like comparing with "-").
Diffstat (limited to 'lib/if2ip.c')
-rw-r--r--lib/if2ip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 2f92b2def..e6faa4b80 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -51,7 +51,7 @@
#endif
#include "inet_ntop.h"
-#include "strequal.h"
+#include "strcase.h"
#include "if2ip.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
@@ -102,7 +102,7 @@ bool Curl_if_is_interface_name(const char *interf)
if(getifaddrs(&head) >= 0) {
for(iface=head; iface != NULL; iface=iface->ifa_next) {
- if(curl_strequal(iface->ifa_name, interf)) {
+ if(strcasecompare(iface->ifa_name, interf)) {
result = TRUE;
break;
}
@@ -132,7 +132,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
for(iface = head; iface != NULL; iface=iface->ifa_next) {
if(iface->ifa_addr != NULL) {
if(iface->ifa_addr->sa_family == af) {
- if(curl_strequal(iface->ifa_name, interf)) {
+ if(strcasecompare(iface->ifa_name, interf)) {
void *addr;
char *ip;
char scope[12] = "";
@@ -180,7 +180,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope,
}
}
else if((res == IF2IP_NOT_FOUND) &&
- curl_strequal(iface->ifa_name, interf)) {
+ strcasecompare(iface->ifa_name, interf)) {
res = IF2IP_AF_NOT_SUPPORTED;
}
}