summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorC. McEnroe2020-04-02 16:13:23 -0400
committerC. McEnroe2020-04-02 16:13:23 -0400
commit2d36c4d7c9aebb9bd1b70b73956edcb81199c587 (patch)
tree09d4b584703dab242a75aed3e2a5380cf216abfa /chat.c
parent06543b7030780824aa86fe4dbd4d6bca2f75ce1e (diff)
Use a for loop for getopt
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/chat.c b/chat.c
index 22c5665..ea6e0c4 100644
--- a/chat.c
+++ b/chat.c
@@ -159,8 +159,7 @@ int main(int argc, char *argv[]) {
 		if (options[i].has_arg) opts[j++] = ':';
 	}
 
-	int opt;
-	while (0 < (opt = getopt_config(argc, argv, opts, options, NULL))) {
+	for (int opt; 0 < (opt = getopt_config(argc, argv, opts, options, NULL));) {
 		switch (opt) {
 			break; case '!': insecure = true;
 			break; case 'C': utilPush(&urlCopyUtil, optarg);