adopt shorter switch(...) { case ... } convention

This commit is contained in:
randomuser 2021-06-10 23:23:06 -05:00
parent 85f3d82f15
commit b700a35ded
1 changed files with 9 additions and 26 deletions

View File

@ -84,32 +84,15 @@ int main(int argc, char **argv) {
char c; char c;
while((c = getopt (argc, argv, "evdbfm:s:")) != -1) { while((c = getopt (argc, argv, "evdbfm:s:")) != -1) {
switch(c) { switch(c) {
case 'e': break; case 'e': settings.e = 1;
settings.e = 1; break; case 'v': settings.v = 1;
break; break; case 'd': settings.d = 1;
case 'v': break; case 'b': settings.b = 1;
settings.v = 1; break; case 'f': settings.f = 1;
break; break; case 'm': settings.m = atoi(optarg);
case 'd': break; case 's': settings.s = atoi(optarg);
settings.d = 1; break; case '?': return 1;
break; break; default: abort();
case 'b':
settings.b = 1;
break;
case 'f':
settings.f = 1;
break;
case 'm':
settings.m = atoi(optarg);
break;
case 's':
settings.s = atoi(optarg);
break;
case '?':
return 1;
default:
abort();
break;
} }
} }
timerloop(); timerloop();