[Pkg-gnupg-commit] [gnupg2] 69/116: gpg: Rename a var to avoid a shadowing warning.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 24 04:40:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit c99a09f111c5980ae034faaea61a00d9ad60463c
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 12 10:40:26 2017 +0100

    gpg: Rename a var to avoid a shadowing warning.
    
    * g10/keygen.c (keygen_set_std_prefs): Rename variable.
    --
    
    I consider it better not to use the name of a commonly used function.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 g10/keygen.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/g10/keygen.c b/g10/keygen.c
index b4fddba..98ef29e 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -434,9 +434,11 @@ keygen_set_std_prefs (const char *string,int personal)
 
     if(strlen(string))
       {
-	char *dup, *tok, *prefstring;
+	char *prefstringbuf;
+        char *tok, *prefstring;
 
-	dup = prefstring = xstrdup (string); /* need a writable string! */
+        /* We need a writable string. */
+	prefstring = prefstringbuf = xstrdup (string);
 
 	while((tok=strsep(&prefstring," ,")))
 	  {
@@ -470,7 +472,7 @@ keygen_set_std_prefs (const char *string,int personal)
 	      }
 	  }
 
-	xfree (dup);
+	xfree (prefstringbuf);
       }
 
     if(!rc)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list