]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid warnings.
authorBruno Haible <bruno@clisp.org>
Sat, 17 Mar 2007 11:21:39 +0000 (11:21 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:43 +0000 (12:14 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/msginit.c

index 8a4aa9d6abe7bd5f24beb1469c25758ef4a24c01..815854309b08043cefcb283435e2bda99da8dd41 100644 (file)
@@ -1,3 +1,7 @@
+2007-03-10  Bruno Haible  <bruno@clisp.org>
+
+       * msginit.c (get_user_fullname): Reduce scope of local variables.
+
 2007-03-04  Bruno Haible  <bruno@clisp.org>
 
        Moved --enable-relocatable infrastructure to gnulib.
index 248a4497b5b040703de7136b791ae9095708ce28..141e51529547e785d04d1b5b7479c71bd3b7f037 100644 (file)
@@ -1003,14 +1003,15 @@ static const char *
 get_user_fullname ()
 {
   struct passwd *pwd;
-  const char *fullname;
-  const char *fullname_end;
-  char *result;
 
   pwd = get_user_pwd ();
 #if HAVE_PWD_H
   if (pwd != NULL)
     {
+      const char *fullname;
+      const char *fullname_end;
+      char *result;
+
       /* Return the pw_gecos field, upto the first comma (if any).  */
       fullname = pwd->pw_gecos;
       fullname_end = strchr (fullname, ',');