Replace int opt; while with for loop in sandman

master
C. McEnroe 2020-03-31 10:17:21 -04:00
parent ff78362826
commit 16b16a72e5
1 changed files with 1 additions and 2 deletions

View File

@ -44,8 +44,7 @@ static void handler(int signal) {
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
uint delay = 8; uint delay = 8;
int opt; for (int opt; 0 < (opt = getopt(argc, argv, "t:"));) {
while (0 < (opt = getopt(argc, argv, "t:"))) {
switch (opt) { switch (opt) {
break; case 't': delay = strtoul(optarg, NULL, 10); break; case 't': delay = strtoul(optarg, NULL, 10);
break; default: return EX_USAGE; break; default: return EX_USAGE;