mirror of
https://github.com/curl/curl.git
synced 2026-08-26 14:33:32 +03:00
if2ip.c: fix compiler warning 'enumerated type is mixed with another type'
This commit is contained in:
parent
6e4835c795
commit
07efe110cc
2 changed files with 8 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue