diff options
author | Yang Tse <yangsita@gmail.com> | 2011-12-13 15:47:26 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-12-13 15:47:26 +0100 |
commit | 07efe110cc7dce18e6ef4ff73b1acbd30842471c (patch) | |
tree | b402ba9123a9136c1af77039a276c631cc34e854 /lib/if2ip.c | |
parent | 6e4835c795996ee92ac1aa78733f23a089f310a5 (diff) | |
download | curl-07efe110cc7dce18e6ef4ff73b1acbd30842471c.tar.gz |
if2ip.c: fix compiler warning 'enumerated type is mixed with another type'
Diffstat (limited to 'lib/if2ip.c')
-rw-r--r-- | lib/if2ip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/if2ip.c b/lib/if2ip.c index 0ae375b15..864fcb3fa 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -92,7 +92,7 @@ bool Curl_if_is_interface_name(const char *interface) char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size) { struct ifaddrs *iface, *head; - char *ip=NULL; + char *ip = NULL; if(getifaddrs(&head) >= 0) { for(iface=head; iface != NULL; iface=iface->ifa_next) { @@ -132,7 +132,9 @@ bool Curl_if_is_interface_name(const char *interface) /* This is here just to support the old interfaces */ char buf[256]; - return (Curl_if2ip(AF_INET, interface, buf, sizeof(buf)) != NULL); + char *ip = Curl_if2ip(AF_INET, interface, buf, sizeof(buf)); + + return (ip != NULL) ? TRUE : FALSE; } char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size) |