From 8250742b90b8b54e642fa9201bf0cf8b7c27bbb8 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 29 Mar 2011 09:00:22 -0400 Subject: fix tempnam name generation, and a small bug in tmpnam on retry limit --- src/stdio/tmpnam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stdio/tmpnam.c') diff --git a/src/stdio/tmpnam.c b/src/stdio/tmpnam.c index 6099b74b..010cf039 100644 --- a/src/stdio/tmpnam.c +++ b/src/stdio/tmpnam.c @@ -26,5 +26,5 @@ char *tmpnam(char *s) n = ts.tv_nsec ^ (unsigned)&s ^ (unsigned)s; snprintf(s, L_tmpnam, "/tmp/t%x-%x", a_fetch_add(&index, 1), n); } while (!__syscall(SYS_access, s, F_OK) && try++=MAXTRIES ? 0 : s; } -- cgit v1.2.1