2011-02-21 Paul Eggert <eggert@cs.ucla.edu>
+ * 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:
char *inname, *outname;
int indesc, outdesc;
ssize_t nread;
- int status;
+ int wait_status;
int c, preserve_mail = 0;
#ifndef MAIL_USE_SYSTEM_LOCK
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
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);
}
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);
}