Use a for loop for getopt

master
C. McEnroe 2020-04-02 16:13:23 -04:00
parent 06543b7030
commit 2d36c4d7c9
1 changed files with 1 additions and 2 deletions

3
chat.c
View File

@ -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);