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/diff/diffreg.c | |
parent | b75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff) |
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/diff/diffreg.c')
-rw-r--r-- | usr.bin/diff/diffreg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 35d61c349cb..4f52365dd52 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffreg.c,v 1.91 2016/03/01 20:57:35 natano Exp $ */ +/* $OpenBSD: diffreg.c,v 1.92 2019/06/28 05:35:34 deraadt Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -457,7 +457,7 @@ opentemp(const char *file) (void)strlcpy(tempfile, _PATH_TMP "/diff.XXXXXXXX", sizeof(tempfile)); - if ((ofd = mkstemp(tempfile)) < 0) { + if ((ofd = mkstemp(tempfile)) == -1) { close(ifd); return (NULL); } |