summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-03-04 02:34:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-03-04 02:34:50 +0000
commitf43b7248e3fe35aa85cc2163e56c26b11c3fcbc5 (patch)
treee66b6213eca683a9c53640c75a524cbb68f0039b /lib/libc
parent5f18115c17c8d9c0f3a067b5b55c3b42c1f681d7 (diff)
uninitialized case; bde
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/mktemp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index d54deceb503..f4e5e0f29fa 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: mktemp.c,v 1.10 1997/10/07 22:21:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: mktemp.c,v 1.11 1998/03/04 02:34:49 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -115,13 +115,14 @@ _gettemp(path, doopen, domkdir)
c = (pid - 26) + 'a';
*trv-- = c;
}
+ start = trv + 1;
/*
* check the target directory; if you have six X's and it
* doesn't exist this runs for a *very* long time.
*/
if (doopen || domkdir) {
- for (start = trv + 1;; --trv) {
+ for (;; --trv) {
if (trv <= path)
break;
if (*trv == '/') {