diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 13:32:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 13:32:54 +0000 |
commit | 86ffccf24f66032a89d70a32b3609584c0db7345 (patch) | |
tree | 2ae97fac6ea5be57cc953baf8612e8f683da0172 /usr.sbin/hostapd/hostapd.c | |
parent | ce9fea47562d4f179d45680d6aec00ede2877141 (diff) |
When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
Diffstat (limited to 'usr.sbin/hostapd/hostapd.c')
-rw-r--r-- | usr.sbin/hostapd/hostapd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/hostapd/hostapd.c b/usr.sbin/hostapd/hostapd.c index 2808d3f57e1..49085569573 100644 --- a/usr.sbin/hostapd/hostapd.c +++ b/usr.sbin/hostapd/hostapd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostapd.c,v 1.39 2019/05/10 01:29:31 guenther Exp $ */ +/* $OpenBSD: hostapd.c,v 1.40 2019/06/28 13:32:47 deraadt Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@openbsd.org> @@ -281,7 +281,7 @@ hostapd_udp_init(struct hostapd_config *cfg) "%s: %s\n", IAPP_MCASTADDR, strerror(errno)); if (setsockopt(iapp->i_udp, IPPROTO_IP, IP_MULTICAST_TTL, - &iapp->i_ttl, sizeof(iapp->i_ttl)) < 0) + &iapp->i_ttl, sizeof(iapp->i_ttl)) == -1) hostapd_fatal("failed to set multicast ttl to " "%u: %s\n", iapp->i_ttl, strerror(errno)); |