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>
fsdg20230625
Leah Rowe 2023-06-04 15:23:51 +01:00
parent 3c2a287eea
commit e8889fd107
1 changed files with 3 additions and 4 deletions

View File

@ -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();
}