Commit 1d0a775f authored by rswindell's avatar rswindell
Browse files

Typecast INADDR_NONE return value from resolve_ip() - solves Sun build warning.

parent 085a318d
......@@ -573,7 +573,7 @@ static u_long resolve_ip(char *addr)
HOSTENT* host;
if(*addr==0)
return(INADDR_NONE);
return((u_long)INADDR_NONE);
for(p=addr;*p;p++)
if(*p!='.' && !isdigit(*p))
......@@ -583,7 +583,7 @@ static u_long resolve_ip(char *addr)
if((host=gethostbyname(addr))==NULL) {
lprintf(LOG_WARNING,"0000 !ERROR resolving hostname: %s",addr);
return(INADDR_NONE);
return((u_long)INADDR_NONE);
}
return(*((ulong*)host->h_addr_list[0]));
}
......
......@@ -223,7 +223,7 @@ u_long resolve_ip(char *addr)
char* p;
if(*addr==0)
return(INADDR_NONE);
return((u_long)INADDR_NONE);
for(p=addr;*p;p++)
if(*p!='.' && !isdigit(*p))
......@@ -231,7 +231,7 @@ u_long resolve_ip(char *addr)
if(!(*p))
return(inet_addr(addr));
if((host=gethostbyname(addr))==NULL)
return(INADDR_NONE);
return((u_long)INADDR_NONE);
return(*((ulong*)host->h_addr_list[0]));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment