Replace int opt; while with for loop in sandman
parent
ff78362826
commit
16b16a72e5
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue