diff options
author | 2009-03-20 16:05:11 +0000 | |
---|---|---|
committer | 2009-03-20 16:05:11 +0000 | |
commit | c426be36e3eb559c3a681e66574aac8073c72fa7 (patch) | |
tree | 8b3aec2f4a78214a50ec6ac07bd1d99d026d0811 /lib/libc/stdio/mktemp.c | |
parent | While working on some stuff in uvm I've gotten REALLY sick of reading (diff) | |
download | wireguard-openbsd-c426be36e3eb559c3a681e66574aac8073c72fa7.tar.xz wireguard-openbsd-c426be36e3eb559c3a681e66574aac8073c72fa7.zip |
Return -1 from mktemp_internal() on EINVAL like we used to.
OK oga@ thib@
Diffstat (limited to 'lib/libc/stdio/mktemp.c')
-rw-r--r-- | lib/libc/stdio/mktemp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index 59a0a5b5c04..3f35659021f 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mktemp.c,v 1.26 2009/03/01 13:35:46 millert Exp $ */ +/* $OpenBSD: mktemp.c,v 1.27 2009/03/20 16:05:11 millert Exp $ */ /* * Copyright (c) 1996-1998, 2008 Theo de Raadt * Copyright (c) 1997, 2008-2009 Todd C. Miller @@ -46,13 +46,13 @@ mktemp_internal(char *path, int slen, int mode) if (*path == '\0') { errno = EINVAL; - return(0); + return(-1); } len = strlen(path); if (len == 0 || slen >= len) { errno = EINVAL; - return(0); + return(-1); } ep = path + len - slen; |