diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-03-25 04:29:26 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-03-25 04:29:26 +0000 |
commit | ac62ea46fc515e25874659c70e765453cdd4b672 (patch) | |
tree | 50f1eacd42d75e067b1a4554b4ba8a880f09a00c /lib/libatm/ip_addr.c | |
parent | f74cd6a71b113eae1cf5d3760c7a6260d3e0de41 (diff) | |
download | FreeBSD-src-ac62ea46fc515e25874659c70e765453cdd4b672.zip FreeBSD-src-ac62ea46fc515e25874659c70e765453cdd4b672.tar.gz |
Fix warnings.
Diffstat (limited to 'lib/libatm/ip_addr.c')
-rw-r--r-- | lib/libatm/ip_addr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c index 23288a8..df10acb 100644 --- a/lib/libatm/ip_addr.c +++ b/lib/libatm/ip_addr.c @@ -73,18 +73,18 @@ get_ip_addr(p) char *p; { struct hostent *ip_host; - static struct sockaddr_in sin; + static struct sockaddr_in s; /* * Get IP address of specified host name */ - bzero(&sin, sizeof(sin)); - sin.sin_family = AF_INET; + bzero(&s, sizeof(s)); + s.sin_family = AF_INET; if (p[0] >= '0' && p[0] <= '9') { /* * IP address is in dotted decimal format */ - if ((sin.sin_addr.s_addr = inet_addr(p)) == -1) { + if ((s.sin_addr.s_addr = inet_addr(p)) == INADDR_NONE) { return((struct sockaddr_in *)0); } } else { @@ -96,9 +96,9 @@ get_ip_addr(p) ip_host->h_addrtype != AF_INET) { return((struct sockaddr_in *)0); } - sin.sin_addr.s_addr = *(u_long *)ip_host->h_addr_list[0]; + s.sin_addr.s_addr = *(u_long *)ip_host->h_addr_list[0]; } - return(&sin); + return(&s); } @@ -115,7 +115,7 @@ get_ip_addr(p) * char * pointer to a text-formatted string * */ -char * +const char * format_ip_addr(addr) struct in_addr *addr; { |