util/spkmodem-recv: properly handle stdin err

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-12 18:34:43 +00:00
parent 22af92b473
commit f7fc5b1651
+2 -1
View File
@@ -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;