diff options
author | 2007-09-25 10:04:47 +0000 | |
---|---|---|
committer | 2007-09-25 10:04:47 +0000 | |
commit | f99068d5a8c8416f86c0c297acc526a45e35e327 (patch) | |
tree | 0f0010dd4be10c3daa5656b42f6a3f76fb3fb9ad /usr.bin/cvs/logmsg.c | |
parent | missing header for mkstemp (diff) | |
download | wireguard-openbsd-f99068d5a8c8416f86c0c297acc526a45e35e327.tar.xz wireguard-openbsd-f99068d5a8c8416f86c0c297acc526a45e35e327.zip |
missing header for mkstemp
check mkstemp return value against -1 instead of NULL
ok joris@
Diffstat (limited to 'usr.bin/cvs/logmsg.c')
-rw-r--r-- | usr.bin/cvs/logmsg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cvs/logmsg.c b/usr.bin/cvs/logmsg.c index c630608cba4..b76e56e3972 100644 --- a/usr.bin/cvs/logmsg.c +++ b/usr.bin/cvs/logmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: logmsg.c,v 1.44 2007/09/04 17:57:41 tobias Exp $ */ +/* $OpenBSD: logmsg.c,v 1.45 2007/09/25 10:04:47 chl Exp $ */ /* * Copyright (c) 2007 Joris Vink <joris@openbsd.org> * @@ -23,6 +23,7 @@ #include <fcntl.h> #include <paths.h> #include <signal.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> @@ -99,7 +100,7 @@ cvs_logmsg_create(struct cvs_flisthead *added, struct cvs_flisthead *removed, (void)xasprintf(&fpath, "%s/cvsXXXXXXXXXX", cvs_tmpdir); - if ((fd = mkstemp(fpath)) == NULL) + if ((fd = mkstemp(fpath)) == -1) fatal("cvs_logmsg_create: mkstemp %s", strerror(errno)); cvs_worklist_add(fpath, &temp_files); |