about summary refs log tree commit diff
path: root/scoop.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-02 16:29:36 -0400
committerJune McEnroe <june@causal.agency>2020-04-02 16:29:36 -0400
commitd156d07f44536bca14c847f7f5313c956a625f96 (patch)
tree805442ac51f29a9e62adf85730b4db9b173da14f /scoop.c
parentUpdate unscoop catgirl matchers (diff)
downloadlitterbox-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.c3
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);