locking.c: Rename exit status variable to `rc'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 24 Apr 2016 22:30:30 +0000 (23:30 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 29 Apr 2016 00:16:23 +0000 (01:16 +0100)
We'll want `st' for a `struct stat'.

locking.c

index 9435318..b358a59 100644 (file)
--- 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);
 }