diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-24 01:10:34 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-07-24 01:10:34 +0000 |
commit | bdd6c46612c883d22a4557e70010e8e721f0db41 (patch) | |
tree | 616c38c5d08afaa63bef36f3525fa77bef16ca0f | |
parent | e3d1aaf787342acf209a4e4c673c0f4775bbe43b (diff) |
inet_aton() returns 0 on error, not -1.
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index 9e3f963db50..4fc3194d8cc 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.5 1997/07/19 07:11:41 deraadt Exp $ */ +/* $OpenBSD: common.c,v 1.6 1997/07/24 01:10:33 millert Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: common.c,v 1.5 1997/07/19 07:11:41 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: common.c,v 1.6 1997/07/24 01:10:33 millert Exp $"; #endif #endif /* not lint */ @@ -146,7 +146,7 @@ getport(rhost, rport) if (rhost == NULL) fatal("no remote host to connect to"); bzero((char *)&sin, sizeof(sin)); - if (inet_aton(rhost, &sin.sin_addr) != -1) + if (inet_aton(rhost, &sin.sin_addr) == 1) sin.sin_family = AF_INET; else { hp = gethostbyname(rhost); |