diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 05:33:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 05:33:36 +0000 |
commit | b75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (patch) | |
tree | 7c8882cb69962f8a96f03962129bae3c5c4559ac | |
parent | 23f7e6930e03d8832a888a49e01c6e95c9af087d (diff) |
atexit() returns -1 on failure
-rw-r--r-- | lib/libutil/pidfile.c | 4 | ||||
-rw-r--r-- | usr.bin/cap_mkdb/cap_mkdb.c | 4 | ||||
-rw-r--r-- | usr.sbin/netgroup_mkdb/netgroup_mkdb.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c index af049d17ecb..0dc47d6e376 100644 --- a/lib/libutil/pidfile.c +++ b/lib/libutil/pidfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pidfile.c,v 1.12 2015/11/27 01:57:59 mmcc Exp $ */ +/* $OpenBSD: pidfile.c,v 1.13 2019/06/28 05:33:35 deraadt Exp $ */ /* $NetBSD: pidfile.c,v 1.4 2001/02/19 22:43:42 cgd Exp $ */ /*- @@ -83,7 +83,7 @@ pidfile(const char *basename) (void) fclose(f); pidfile_pid = pid; - if (atexit(pidfile_cleanup) < 0) { + if (atexit(pidfile_cleanup) == -1) { save_errno = errno; (void) unlink(pidfile_path); free(pidfile_path); diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c index d3ded5fa5dc..23325ecac89 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.22 2015/12/04 19:15:54 jmc Exp $ */ +/* $OpenBSD: cap_mkdb.c,v 1.23 2019/06/28 05:33:35 deraadt 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)) + if (atexit(dounlink) == -1) err(1, "atexit"); db_build(argv); diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c index adfb4d95f5c..0ddcdae0c2c 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.20 2015/10/13 15:12:53 deraadt Exp $ */ +/* $OpenBSD: netgroup_mkdb.c,v 1.21 2019/06/28 05:33:35 deraadt Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -123,7 +123,7 @@ main(int argc, char *argv[]) else if (argc > 1) usage(); - if (atexit(cleanup)) + if (atexit(cleanup) == -1) err(1, "Cannot install exit handler"); /* Read and parse the netgroup file */ |