From: Paul Eggert Date: Mon, 21 Feb 2011 18:22:20 +0000 (-0800) Subject: * movemail.c (main, pop_retr): Rename locals to avoid shadowing. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~782 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27d41fb4a9af23628a0d78cf843df12f3797896d;p=emacs.git * movemail.c (main, pop_retr): Rename locals to avoid shadowing. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 698e7b60a7a..f2e55c3e0c0 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2011-02-21 Paul Eggert + * movemail.c (main, pop_retr): Rename locals to avoid shadowing. + Declare file-scope functions and variables static if not exported. This is more consistent, and is nicer with gcc -Wstrict-prototypes. * ebrowse.c, emacsclient.c, fakemail.c, make-docfile.c, movemail.c: diff --git a/lib-src/movemail.c b/lib-src/movemail.c index a63e858613c..65675f24b9f 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -169,7 +169,7 @@ main (int argc, char **argv) char *inname, *outname; int indesc, outdesc; ssize_t nread; - int status; + int wait_status; int c, preserve_mail = 0; #ifndef MAIL_USE_SYSTEM_LOCK @@ -527,11 +527,11 @@ main (int argc, char **argv) exit (EXIT_SUCCESS); } - wait (&status); - if (!WIFEXITED (status)) + wait (&wait_status); + if (!WIFEXITED (wait_status)) exit (EXIT_FAILURE); - else if (WRETCODE (status) != 0) - exit (WRETCODE (status)); + else if (WRETCODE (wait_status) != 0) + exit (WRETCODE (wait_status)); #if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_SYSTEM_LOCK) #ifdef MAIL_USE_MAILLOCK @@ -828,10 +828,10 @@ pop_retr (popserver server, int msgno, FILE *arg) if (pop_retrieve_first (server, msgno, &line)) { - char *error = concat ("Error from POP server: ", pop_error, ""); - strncpy (Errmsg, error, sizeof (Errmsg)); + char *msg = concat ("Error from POP server: ", pop_error, ""); + strncpy (Errmsg, msg, sizeof (Errmsg)); Errmsg[sizeof (Errmsg)-1] = '\0'; - free(error); + free (msg); return (NOTOK); } @@ -850,10 +850,10 @@ pop_retr (popserver server, int msgno, FILE *arg) if (ret) { - char *error = concat ("Error from POP server: ", pop_error, ""); - strncpy (Errmsg, error, sizeof (Errmsg)); + char *msg = concat ("Error from POP server: ", pop_error, ""); + strncpy (Errmsg, msg, sizeof (Errmsg)); Errmsg[sizeof (Errmsg)-1] = '\0'; - free(error); + free (msg); return (NOTOK); }