summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtucker <dtucker>2011-11-03 23:52:43 +0000
committerdtucker <dtucker>2011-11-03 23:52:43 +0000
commit15ce25f61d6a4bb9e042703ce2f3ae6e32cbd71b (patch)
tree807e03a4d63956e1e723f10b1886495292cde64f
parentaa7cf58c19dc70aab97553b7d36744747dbd6e08 (diff)
downloadopenssh-15ce25f61d6a4bb9e042703ce2f3ae6e32cbd71b.tar.gz
- djm@cvs.openbsd.org 2011/10/19 00:06:10
[moduli.c] s/tmpfile/tmp/ to make this -Wshadow clean
-rw-r--r--ChangeLog3
-rw-r--r--moduli.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 21afdb5c..a590cf9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
- djm@cvs.openbsd.org 2011/10/18 23:37:42
[ssh-add.c]
add -k to usage(); reminded by jmc@
+ - djm@cvs.openbsd.org 2011/10/19 00:06:10
+ [moduli.c]
+ s/tmpfile/tmp/ to make this -Wshadow clean
20111025
- (dtucker) [contrib/cygwin/Makefile] Continue if installing a doc file
diff --git a/moduli.c b/moduli.c
index 0d3948a4..973ee628 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.24 2011/10/16 15:51:39 stsp Exp $ */
+/* $OpenBSD: moduli.c,v 1.25 2011/10/19 00:06:10 djm Exp $ */
/*
* Copyright 1994 Phil Karn <karn@qualcomm.com>
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -445,16 +445,16 @@ static void
write_checkpoint(char *cpfile, u_int32_t lineno)
{
FILE *fp;
- char tmpfile[MAXPATHLEN];
+ char tmp[MAXPATHLEN];
int r;
- r = snprintf(tmpfile, sizeof(tmpfile), "%s.XXXXXXXXXX", cpfile);
+ r = snprintf(tmp, sizeof(tmp), "%s.XXXXXXXXXX", cpfile);
if (r == -1 || r >= MAXPATHLEN) {
logit("write_checkpoint: temp pathname too long");
return;
}
- if ((r = mkstemp(tmpfile)) == -1) {
- logit("mkstemp(%s): %s", tmpfile, strerror(errno));
+ if ((r = mkstemp(tmp)) == -1) {
+ logit("mkstemp(%s): %s", tmp, strerror(errno));
return;
}
if ((fp = fdopen(r, "w")) == NULL) {
@@ -463,7 +463,7 @@ write_checkpoint(char *cpfile, u_int32_t lineno)
return;
}
if (fprintf(fp, "%lu\n", (unsigned long)lineno) > 0 && fclose(fp) == 0
- && rename(tmpfile, cpfile) == 0)
+ && rename(tmp, cpfile) == 0)
debug3("wrote checkpoint line %lu to '%s'",
(unsigned long)lineno, cpfile);
else