Use a for loop for getopt
parent
06543b7030
commit
2d36c4d7c9
3
chat.c
3
chat.c
|
@ -159,8 +159,7 @@ int main(int argc, char *argv[]) {
|
||||||
if (options[i].has_arg) opts[j++] = ':';
|
if (options[i].has_arg) opts[j++] = ':';
|
||||||
}
|
}
|
||||||
|
|
||||||
int opt;
|
for (int opt; 0 < (opt = getopt_config(argc, argv, opts, options, NULL));) {
|
||||||
while (0 < (opt = getopt_config(argc, argv, opts, options, NULL))) {
|
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
break; case '!': insecure = true;
|
break; case '!': insecure = true;
|
||||||
break; case 'C': utilPush(&urlCopyUtil, optarg);
|
break; case 'C': utilPush(&urlCopyUtil, optarg);
|
||||||
|
|
Loading…
Reference in New Issue