diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-06-28 14:20:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-06-28 14:20:41 +0000 |
commit | 0579dc34ca62d17a6fc1bd4662b0390a6d097c1e (patch) | |
tree | aac5f5e894a88242f194654d65f93ffd52d162f6 /usr.bin/cap_mkdb | |
parent | 11a95e36dd26166202bcffe1fb7e3b8a72509d9e (diff) |
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.bin/cap_mkdb')
-rw-r--r-- | usr.bin/cap_mkdb/cap_mkdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index 23325ecac89..bbc312c6647 100644 --- a/usr.bin/cap_mkdb/cap_mkdb.c +++ b/usr.bin/cap_mkdb/cap_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cap_mkdb.c,v 1.23 2019/06/28 05:33:35 deraadt Exp $ */ +/* $OpenBSD: cap_mkdb.c,v 1.24 2019/06/28 14:20:40 schwarze Exp $ */ /* $NetBSD: cap_mkdb.c,v 1.5 1995/09/02 05:47:12 jtc Exp $ */ /*- @@ -111,7 +111,7 @@ main(int argc, char *argv[]) DEFFILEMODE, DB_HASH, &openinfo)) == NULL) err(1, "%s", buf); - if (atexit(dounlink) == -1) + if (atexit(dounlink) != 0) err(1, "atexit"); db_build(argv); |