mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 08:40:14 +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);
|
READ_BUF, stdin);
|
||||||
|
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
|
if (ferror(stdin))
|
||||||
|
err(errno, "stdin read");
|
||||||
if (feof(stdin))
|
if (feof(stdin))
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
err(errno, "stdin read");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
st->inpos = 0;
|
st->inpos = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user