From: Mark Wooding Date: Sun, 24 Apr 2016 22:30:30 +0000 (+0100) Subject: locking.c: Rename exit status variable to `rc'. X-Git-Tag: 1.4.2~1^2~3 X-Git-Url: https://git.distorted.org.uk/~mdw/misc/commitdiff_plain/df6e37e282edff109588f7e7a2b99bfffff905f3 locking.c: Rename exit status variable to `rc'. We'll want `st' for a `struct stat'. --- diff --git a/locking.c b/locking.c index 9435318..b358a59 100644 --- a/locking.c +++ b/locking.c @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) unsigned int ot = 0; time_t nt; pid_t kid; - int st; + int rc; #define f_bogus 1u #define f_wait 2u @@ -205,7 +205,7 @@ doneopts: execvp(prog, av); die(111, "couldn't exec `%s': %s", prog, strerror(errno)); } - if (waitpid(kid, &st, 0) < 0) + if (waitpid(kid, &rc, 0) < 0) die(EXIT_FAILURE, "error from wait: %s", strerror(errno)); l.l_type = F_UNLCK; l.l_whence = SEEK_SET; @@ -213,7 +213,7 @@ doneopts: l.l_len = 0; fcntl(fd, F_SETLK, &l); close(fd); - if (WIFEXITED(st)) exit(WEXITSTATUS(st)); + if (WIFEXITED(rc)) exit(WEXITSTATUS(rc)); else exit(255); }