util/spkmodem-recv: tidy up the getopt loop

more knf-compliant

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-12 05:20:09 +00:00
parent 65a6205dab
commit 69fb0618cc
+6 -7
View File
@@ -104,15 +104,14 @@ main(int argc, char **argv)
argv0 = argv[0];
while (1) {
c = getopt(argc, argv, "d");
if (c == -1)
break;
if (c == 'd')
while ((c = getopt(argc, argv, "d")) != -1) {
switch (c) {
case 'd':
st.debug = 1;
else
break;
default:
err(EINVAL, "Invalid argument");
}
}
setvbuf(stdout, NULL, _IONBF, 0);