summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/mktemp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index f4e5e0f29fa..53b40b027f3 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.11 1998/03/04 02:34:49 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mktemp.c,v 1.12 1998/04/14 19:25:11 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -159,11 +159,13 @@ _gettemp(path, doopen, domkdir)
for (trv = start;;) {
if (!*trv)
return(0);
- if (*trv == 'z')
+ if (*trv == 'Z')
*trv++ = 'a';
else {
if (isdigit(*trv))
*trv = 'a';
+ else if (*trv == 'z') /* inc from z to A */
+ *trv = 'A';
else
++*trv;
break;