popen.c: get rid of a shadow warning

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
This commit is contained in:
Peter S. Mazinger
2011-03-24 00:13:50 +01:00
committed by Bernhard Reutner-Fischer
parent 87936cd013
commit 9b0f7d9989

View File

@@ -129,7 +129,7 @@ FILE *popen(const char *command, const char *modes)
int pclose(FILE *stream)
{
struct popen_list_item *p;
int stat;
int status;
pid_t pid;
/* First, find the list entry corresponding to stream and remove it
@@ -164,8 +164,8 @@ int pclose(FILE *stream)
/* SUSv3 specificly requires that pclose not return before the child
* terminates, in order to disallow pclose from returning on EINTR. */
do {
if (waitpid(pid, &stat, 0) >= 0) {
return stat;
if (waitpid(pid, &status, 0) >= 0) {
return status;
}
if (errno != EINTR) {
break;