mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/spkmodem-recv: always set errno on err()
This version of spkmodem uses err() to indicate an error, and the value of errno is used as exit status at all times, even when it is zero. When calling err(), it is intended that errno always be non-zero, so modify the code accordingly. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -72,7 +72,7 @@ handle_audio(void)
|
||||
}
|
||||
if (llp == FLUSH_TIMEOUT)
|
||||
if (fflush(stdout) == EOF)
|
||||
err(errno, NULL);
|
||||
err(ERR(), NULL);
|
||||
|
||||
if ((f2 <= FREQ_SEP_MIN) || (f2 >= FREQ_SEP_MAX)
|
||||
|| (f1 <= FREQ_DATA_MIN) || (f1 >= FREQ_DATA_MAX)) {
|
||||
@@ -120,7 +120,7 @@ print_char(void)
|
||||
#if DEBUG
|
||||
long stdin_pos = 0;
|
||||
if ((stdin_pos = ftell(stdin)) == -1)
|
||||
err(errno, NULL);
|
||||
err(ERR(), NULL);
|
||||
printf ("%d %d %d @%ld\n", f1, f2, FREQ_DATA_THRESHOLD,
|
||||
stdin_pos - sizeof(frame));
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user