summaryrefslogtreecommitdiff
path: root/util/spkmodem_recv/spkmodem-recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/spkmodem_recv/spkmodem-recv.c')
-rw-r--r--util/spkmodem_recv/spkmodem-recv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c
index 16115bd0..b8e28a46 100644
--- a/util/spkmodem_recv/spkmodem-recv.c
+++ b/util/spkmodem_recv/spkmodem-recv.c
@@ -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();