1) Remove blank line between include of sys/cdefs.h and __FBSDID

2) compare return value of inet_addr to INADDR_NONE rather than -1.
This commit is contained in:
dwmalone 2002-02-27 14:32:43 +00:00
parent 4a97e7fa66
commit 921c81b2d4

View File

@ -28,7 +28,6 @@
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
@ -185,7 +184,7 @@ main(int argc, char *argv[])
case 1:
bzero(&lsin, sizeof lsin);
lsin.sin_family = AF_INET;
if ((lsin.sin_addr.s_addr = inet_addr(argv[optind])) == -1) {
if ((lsin.sin_addr.s_addr = inet_addr(argv[optind])) == INADDR_NONE) {
hent = gethostbyname(argv[optind]);
if (!hent)
errx(ERR_NOSUCHHOST, "host %s unknown", argv[optind]);