diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 05:35:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 05:35:36 +0000 |
commit | db251f9c53ebe82df0e02b3d742581fd8b421989 (patch) | |
tree | 2483bb2028ba9c0fe193188d9d466ea52a607aaa /usr.bin/mktemp | |
parent | b75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff) |
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/mktemp')
-rw-r--r-- | usr.bin/mktemp/mktemp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mktemp/mktemp.c b/usr.bin/mktemp/mktemp.c index f21b85d925d..188fac101ad 100644 --- a/usr.bin/mktemp/mktemp.c +++ b/usr.bin/mktemp/mktemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mktemp.c,v 1.24 2019/06/27 18:03:37 deraadt Exp $ */ +/* $OpenBSD: mktemp.c,v 1.25 2019/06/28 05:35:34 deraadt Exp $ */ /* * Copyright (c) 1996, 1997, 2001-2003, 2013 @@ -108,7 +108,7 @@ main(int argc, char *argv[]) if (uflag) (void)rmdir(tempfile); } else { - if ((fd = mkstemp(tempfile)) < 0) + if ((fd = mkstemp(tempfile)) == -1) fatal("cannot make temp file %s", tempfile); (void)close(fd); if (uflag) |