From d156d07f44536bca14c847f7f5313c956a625f96 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 2 Apr 2020 16:29:36 -0400 Subject: Update style Replacing declarations followed by while loops with for loops and generating the short option string from the long options. --- scoop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scoop.c') diff --git a/scoop.c b/scoop.c index 7750a47..a1b75c7 100644 --- a/scoop.c +++ b/scoop.c @@ -385,9 +385,8 @@ int main(int argc, char *argv[]) { const char *search = NULL; const char *where = NULL; - int opt; const char *Opts = "D:F:LN:T:a:b:c:d:f:gh:l:m:n:pqst:u:vw:"; - while (0 < (opt = getopt(argc, argv, Opts))) { + for (int opt; 0 < (opt = getopt(argc, argv, Opts));) { switch (opt) { break; case 'D': binds[n++] = Bind(":date", optarg, 0); break; case 'F': binds[n++] = Bind(":format", optarg, 0); -- cgit 1.4.1