mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/spkmodem-recv: properly handle stdin err
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -212,9 +212,10 @@ read_sample(struct decoder_state *st)
|
||||
READ_BUF, stdin);
|
||||
|
||||
if (n == 0) {
|
||||
if (ferror(stdin))
|
||||
err(errno, "stdin read");
|
||||
if (feof(stdin))
|
||||
exit(EXIT_SUCCESS);
|
||||
err(errno, "stdin read");
|
||||
}
|
||||
|
||||
st->inpos = 0;
|
||||
|
||||
Reference in New Issue
Block a user