summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/spkmodem_recv/spkmodem-recv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/spkmodem_recv/spkmodem-recv.c b/util/spkmodem_recv/spkmodem-recv.c
index 4ff1fb5f..db7454ca 100644
--- a/util/spkmodem_recv/spkmodem-recv.c
+++ b/util/spkmodem_recv/spkmodem-recv.c
@@ -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;