diff options
-rw-r--r-- | gettext-tools/src/ChangeLog | 4 | ||||
-rw-r--r-- | gettext-tools/src/msginit.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 8a4aa9d..8158543 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -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. diff --git a/gettext-tools/src/msginit.c b/gettext-tools/src/msginit.c index 248a449..141e515 100644 --- a/gettext-tools/src/msginit.c +++ b/gettext-tools/src/msginit.c @@ -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, ','); |