util/spkmodem-recv: simplify getopt handling
Signed-off-by: Leah Rowe <leah@libreboot.org>fsdg20230625
parent
5c5c1c64fd
commit
5be3d67ced
|
@ -57,11 +57,9 @@ main(int argc, char *argv[])
|
|||
if (pledge("stdio", NULL) == -1)
|
||||
err(ERR(), "pledge");
|
||||
#endif
|
||||
while ((c = getopt(argc, argv, "d")) != -1) {
|
||||
if (c != 'd')
|
||||
while ((c = getopt(argc, argv, "d")) != -1)
|
||||
if (!(debug = (c == 'd')))
|
||||
err(errno = EINVAL, NULL);
|
||||
debug = 1;
|
||||
}
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
while (!feof(stdin))
|
||||
handle_audio();
|
||||
|
|
Loading…
Reference in New Issue