diff options
author | schwarze <schwarze@openbsd.org> | 2019-06-28 14:20:40 +0000 |
---|---|---|
committer | schwarze <schwarze@openbsd.org> | 2019-06-28 14:20:40 +0000 |
commit | 80e53f5bf656e1c4a7e523023dc34564a1eae491 (patch) | |
tree | c2ebe0cfb025ee5851048cc61f32c13f545a1c6d /usr.sbin/netgroup_mkdb | |
parent | When system calls indicate an error they return -1, not some arbitrary (diff) | |
download | wireguard-openbsd-80e53f5bf656e1c4a7e523023dc34564a1eae491.tar.xz wireguard-openbsd-80e53f5bf656e1c4a7e523023dc34564a1eae491.zip |
Actually, the C standard only guarantees that atexit(3) returns non-zero
on error, so tweak previous to test "atexit(...) != 0" for portability.
"OK ok ok sorry backwards" deraadt@
Diffstat (limited to 'usr.sbin/netgroup_mkdb')
-rw-r--r-- | usr.sbin/netgroup_mkdb/netgroup_mkdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c index 0ddcdae0c2c..1420eec0beb 100644 --- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c +++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netgroup_mkdb.c,v 1.21 2019/06/28 05:33:35 deraadt Exp $ */ +/* $OpenBSD: netgroup_mkdb.c,v 1.22 2019/06/28 14:20:40 schwarze Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -123,7 +123,7 @@ main(int argc, char *argv[]) else if (argc > 1) usage(); - if (atexit(cleanup) == -1) + if (atexit(cleanup) != 0) err(1, "Cannot install exit handler"); /* Read and parse the netgroup file */ |