summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-05-06 08:39:43 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-05-06 08:39:43 +0000
commit22341c17511c958cbf72d3f608b9561187588b0a (patch)
treef907968c191a4c207797f3d8989e33b54039bcfb /usr.sbin/pppd
parent84a2005982c2cd106ac42278e6aa1b86fbb26a61 (diff)
downloadFreeBSD-src-22341c17511c958cbf72d3f608b9561187588b0a.zip
FreeBSD-src-22341c17511c958cbf72d3f608b9561187588b0a.tar.gz
inet_aton returns 0 on failure, not -1.
PR: 37680 Submitted by: Scott Bertilson <scott@nts.umn.edu> MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r--usr.sbin/pppd/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pppd/options.c b/usr.sbin/pppd/options.c
index 2b70bc0..d1e679b 100644
--- a/usr.sbin/pppd/options.c
+++ b/usr.sbin/pppd/options.c
@@ -1812,7 +1812,7 @@ setnetmask(argv)
{
struct in_addr mask;
- if ((inet_aton(*argv, &mask)) == -1 || (netmask & ~mask.s_addr)) {
+ if (!inet_aton(*argv, &mask) || (netmask & ~mask.s_addr)) {
fprintf(stderr, "Invalid netmask %s\n", *argv);
return (0);
}
OpenPOWER on IntegriCloud