From d2350a1e8027e9550996464739885f5ec468bd83 Mon Sep 17 00:00:00 2001 From: Stephane Chazelas Date: Sun, 18 Mar 2018 16:49:42 -0700 Subject: 42469: necessary repairs to 42465 found by "make check" --- Src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index ce8cf8c55..35b0bb191 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -4599,8 +4599,8 @@ readoutput(int in, int qt, int *readerror) } *ptr++ = c; } - if (readerror && ferror(fin)) - *readerror = errno; + if (readerror) + *readerror = ferror(fin) ? errno : 0; fclose(fin); while (cnt && ptr[-1] == '\n') ptr--, cnt--; -- cgit 1.4.1