@matheusbsbs / matheus-bagliano / commits / 6f002f984f
Fork 0

use appropriate typedefs

Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

David Rientjes committed Aug 15, 2006 at 10:40 UTC 6f002f984f1d1ddfdae990582a423dc5263697ae
4 files changed +8 -8
fetch-clone.c
+1 -2
@@ -44,9 +44,8 @@ static int finish_pack(const char *pack_tmp_name, const char *me)
44
45 for (;;) {
46 int status, code;
47 - int retval = waitpid(pid, &status, 0);
47
49 - if (retval < 0) {
48 + if (waitpid(pid, &status, 0) < 0) {
49 if (errno == EINTR)
50 continue;
51 error("waitpid failed (%s)", strerror(errno));
merge-index.c
+2 -1
@@ -11,7 +11,8 @@ static int err;
11
12 static void run_program(void)
13 {
14 - int pid = fork(), status;
14 + pid_t pid = fork();
15 + int status;
16
17 if (pid < 0)
18 die("unable to fork");
run-command.c
+4 -4
@@ -25,15 +25,15 @@ int run_command_v_opt(int argc, const char **argv, int flags)
25 }
26 for (;;) {
27 int status, code;
28 - int retval = waitpid(pid, &status, 0);
28 + pid_t waiting = waitpid(pid, &status, 0);
29
30 - if (retval < 0) {
30 + if (waiting < 0) {
31 if (errno == EINTR)
32 continue;
33 - error("waitpid failed (%s)", strerror(retval));
33 + error("waitpid failed (%s)", strerror(errno));
34 return -ERR_RUN_COMMAND_WAITPID;
35 }
36 - if (retval != pid)
36 + if (waiting != pid)
37 return -ERR_RUN_COMMAND_WAITPID_WRONG_PID;
38 if (WIFSIGNALED(status))
39 return -ERR_RUN_COMMAND_WAITPID_SIGNAL;
unpack-trees.c
+1 -1
@@ -278,7 +278,7 @@ static void unlink_entry(char *name)
278 }
279 }
280
281 -static volatile int progress_update = 0;
281 +static volatile sig_atomic_t progress_update = 0;
282
283 static void progress_interval(int signum)
284 {