summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0bef57e)
raw | patch | inline | side by side (parent: 0bef57e)
author | David Rientjes <rientjes@google.com> | |
Tue, 15 Aug 2006 17:40:06 +0000 (10:40 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 15 Aug 2006 23:12:09 +0000 (16:12 -0700) |
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
fetch-clone.c | patch | blob | history | |
merge-index.c | patch | blob | history | |
run-command.c | patch | blob | history | |
unpack-trees.c | patch | blob | history |
diff --git a/fetch-clone.c b/fetch-clone.c
index 5e84c4620ff96f5c7ab93e5f3bfd10609edd5fd5..c5cf4776fabb8f9f09028dd1f0cfaf1d55e1397c 100644 (file)
--- a/fetch-clone.c
+++ b/fetch-clone.c
for (;;) {
int status, code;
- int retval = waitpid(pid, &status, 0);
- if (retval < 0) {
+ if (waitpid(pid, &status, 0) < 0) {
if (errno == EINTR)
continue;
error("waitpid failed (%s)", strerror(errno));
diff --git a/merge-index.c b/merge-index.c
index 0498a6f45e53947e356c6a390869d3f8194f05b7..a9c8cc1f93a815a9b8226394e6f035a016fedbdb 100644 (file)
--- a/merge-index.c
+++ b/merge-index.c
static void run_program(void)
{
- int pid = fork(), status;
+ pid_t pid = fork();
+ int status;
if (pid < 0)
die("unable to fork");
diff --git a/run-command.c b/run-command.c
index ca67ee9333e1f4125678fe607f44d75becc3cf7e..61908682b9b251ac49ae655522a3143476a888ea 100644 (file)
--- a/run-command.c
+++ b/run-command.c
}
for (;;) {
int status, code;
- int retval = waitpid(pid, &status, 0);
+ pid_t waiting = waitpid(pid, &status, 0);
- if (retval < 0) {
+ if (waiting < 0) {
if (errno == EINTR)
continue;
- error("waitpid failed (%s)", strerror(retval));
+ error("waitpid failed (%s)", strerror(errno));
return -ERR_RUN_COMMAND_WAITPID;
}
- if (retval != pid)
+ if (waiting != pid)
return -ERR_RUN_COMMAND_WAITPID_WRONG_PID;
if (WIFSIGNALED(status))
return -ERR_RUN_COMMAND_WAITPID_SIGNAL;
diff --git a/unpack-trees.c b/unpack-trees.c
index a20639be70edb13bc87353a69a13f17994ea41a5..e496d8cd31b54dd3d278499d7d85439478181ce8 100644 (file)
--- a/unpack-trees.c
+++ b/unpack-trees.c
}
}
-static volatile int progress_update = 0;
+static volatile sig_atomic_t progress_update = 0;
static void progress_interval(int signum)
{