diff options
author | Leah Rowe <leah@libreboot.org> | 2023-06-04 15:23:51 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-06-04 15:23:51 +0100 |
commit | e8889fd107638923bdd6d8929d45a340d02e8ed7 (patch) | |
tree | bfe53a630d087cdb39b931f501f3506810f6cf87 | |
parent | 3c2a287eeab43d87a10b4acd52508f87e4e11e2c (diff) |
util/spkmodem-recv: minor code cleanup
also be more thorough about errno value when calling
pledge. rename variable in a for loop for clarity.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | util/spkmodem_recv/spkmodem-recv.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c index 93afd95a..77d64637 100644 --- a/util/spkmodem_recv/spkmodem-recv.c +++ b/util/spkmodem_recv/spkmodem-recv.c @@ -40,7 +40,7 @@ main(int argc, char *argv[]) #ifdef __OpenBSD__ if (pledge("stdio", NULL) == -1) - err(errno, "pledge"); + err(ERR(), "pledge"); #endif while ((c = getopt(argc, argv, "u")) != -1) { @@ -82,9 +82,8 @@ handle_audio(void) print_char(); - lp = 0; - llp = 0; - for (int i = 0; i < SAMPLES_PER_FRAME; i++) + lp = llp = 0; + for (int sample = 0; sample < SAMPLES_PER_FRAME; sample++) fetch_sample(); } |