Module Name:    src
Committed By:   msaitoh
Date:           Thu Jun 19 05:31:15 UTC 2014

Modified Files:
        src/lib/libc/stdio: gettemp.c

Log Message:
Fix "shadows a global declaration" compile error.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/stdio/gettemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdio/gettemp.c
diff -u src/lib/libc/stdio/gettemp.c:1.18 src/lib/libc/stdio/gettemp.c:1.19
--- src/lib/libc/stdio/gettemp.c:1.18	Wed Jun 18 17:47:58 2014
+++ src/lib/libc/stdio/gettemp.c	Thu Jun 19 05:31:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gettemp.c,v 1.18 2014/06/18 17:47:58 christos Exp $	*/
+/*	$NetBSD: gettemp.c,v 1.19 2014/06/19 05:31:15 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)mktemp.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: gettemp.c,v 1.18 2014/06/18 17:47:58 christos Exp $");
+__RCSID("$NetBSD: gettemp.c,v 1.19 2014/06/19 05:31:15 msaitoh Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -56,7 +56,7 @@ GETTEMP(char *path, int *doopen, int dom
 	char *pad;
 	struct stat sbuf;
 	int rval;
-	uint32_t rand;
+	uint32_t r;
 	char carrybuf[MAXPATHLEN];
 
 	_DIAGASSERT(path != NULL);
@@ -85,8 +85,8 @@ GETTEMP(char *path, int *doopen, int dom
 
 	/* Fill space with random characters */
 	while (trv >= path && *trv == 'X') {
-		rand = arc4random_uniform(sizeof(padchar) - 1);
-		*trv-- = padchar[rand];
+		r = arc4random_uniform(sizeof(padchar) - 1);
+		*trv-- = padchar[r];
 	}
 	start = trv + 1;
 

Reply via email to