]> git.ipfire.org Git - thirdparty/git.git/commitdiff
use appropriate typedefs
authorDavid Rientjes <rientjes@google.com>
Tue, 15 Aug 2006 17:40:06 +0000 (10:40 -0700)
committerJunio 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>
fetch-clone.c
merge-index.c
run-command.c
unpack-trees.c

index 5e84c4620ff96f5c7ab93e5f3bfd10609edd5fd5..c5cf4776fabb8f9f09028dd1f0cfaf1d55e1397c 100644 (file)
@@ -44,9 +44,8 @@ static int finish_pack(const char *pack_tmp_name, const char *me)
 
        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));
index 0498a6f45e53947e356c6a390869d3f8194f05b7..a9c8cc1f93a815a9b8226394e6f035a016fedbdb 100644 (file)
@@ -11,7 +11,8 @@ static int err;
 
 static void run_program(void)
 {
-       int pid = fork(), status;
+       pid_t pid = fork();
+       int status;
 
        if (pid < 0)
                die("unable to fork");
index ca67ee9333e1f4125678fe607f44d75becc3cf7e..61908682b9b251ac49ae655522a3143476a888ea 100644 (file)
@@ -25,15 +25,15 @@ int run_command_v_opt(int argc, const char **argv, int flags)
        }
        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;
index a20639be70edb13bc87353a69a13f17994ea41a5..e496d8cd31b54dd3d278499d7d85439478181ce8 100644 (file)
@@ -278,7 +278,7 @@ static void unlink_entry(char *name)
        }
 }
 
-static volatile int progress_update = 0;
+static volatile sig_atomic_t progress_update = 0;
 
 static void progress_interval(int signum)
 {