diff options
author | June McEnroe <june@causal.agency> | 2020-04-02 16:29:36 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-02 16:29:36 -0400 |
commit | d156d07f44536bca14c847f7f5313c956a625f96 (patch) | |
tree | 805442ac51f29a9e62adf85730b4db9b173da14f /scoop.c | |
parent | Update unscoop catgirl matchers (diff) | |
download | litterbox-d156d07f44536bca14c847f7f5313c956a625f96.tar.gz litterbox-d156d07f44536bca14c847f7f5313c956a625f96.zip |
Update style
Replacing declarations followed by while loops with for loops and generating the short option string from the long options.
Diffstat (limited to '')
-rw-r--r-- | scoop.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |