summaryrefslogtreecommitdiff
path: root/usr.bin/unifdef
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 05:35:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 05:35:36 +0000
commitdb251f9c53ebe82df0e02b3d742581fd8b421989 (patch)
tree2483bb2028ba9c0fe193188d9d466ea52a607aaa /usr.bin/unifdef
parentb75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff)
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/unifdef')
-rw-r--r--usr.bin/unifdef/unifdef.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/unifdef/unifdef.c b/usr.bin/unifdef/unifdef.c
index 03bfff7fc71..f43a95472cd 100644
--- a/usr.bin/unifdef/unifdef.c
+++ b/usr.bin/unifdef/unifdef.c
@@ -1585,7 +1585,7 @@ static FILE *
mktempmode(char *tmp, int mode)
{
int fd = mkstemp(tmp);
- if (fd < 0)
+ if (fd == -1)
return (NULL);
fchmod(fd, mode & (S_IRWXU|S_IRWXG|S_IRWXO));
return (fdopen(fd, "wb"));