diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-07-22 17:01:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2017-07-22 17:01:10 +0000 |
commit | f99603c3b9b71b28c8555b8e8c5ae2ef2431e053 (patch) | |
tree | 3492c95872580d1e6b57fdc4ddb52f391939bb10 | |
parent | 1d030bedf781e15d023584de9bddc704feba1848 (diff) |
use automatic variables rather than globals; no functional change;
from ScottCheloha at gmail dot com on tech, tweaked by me
-rw-r--r-- | usr.bin/time/time.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/time/time.c b/usr.bin/time/time.c index 4a82fd8ad8c..f3e68f1124e 100644 --- a/usr.bin/time/time.c +++ b/usr.bin/time/time.c @@ -1,4 +1,4 @@ -/* $OpenBSD: time.c,v 1.23 2017/07/22 16:20:10 schwarze Exp $ */ +/* $OpenBSD: time.c,v 1.24 2017/07/22 17:01:09 schwarze Exp $ */ /* $NetBSD: time.c,v 1.7 1995/06/27 00:34:00 jtc Exp $ */ /* @@ -42,23 +42,21 @@ #include <stdlib.h> #include <unistd.h> -int lflag; -int portableflag; - __dead void usage(void); int main(int argc, char *argv[]) { - pid_t pid; - int ch, status; - struct timespec before, after, during; struct rusage ru; - int exitonsig = 0; + struct timespec before, after, during; + int ch, exitonsig, lflag, portableflag, status; + pid_t pid; if (pledge("stdio proc exec", NULL) == -1) err(1, "pledge"); + exitonsig = lflag = portableflag = 0; + while ((ch = getopt(argc, argv, "lp")) != -1) { switch(ch) { case 'l': |