From: Michael Tremer Date: Tue, 18 Mar 2025 16:59:40 +0000 (+0000) Subject: tests: Fail with error code if fgetc() returns an error X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae68c3db969ec846426c72f69a0849493fd590f9;p=pakfire.git tests: Fail with error code if fgetc() returns an error Signed-off-by: Michael Tremer --- diff --git a/tests/stub/command.c b/tests/stub/command.c index 9fdcce41c..053661b56 100644 --- a/tests/stub/command.c +++ b/tests/stub/command.c @@ -18,6 +18,7 @@ # # #############################################################################*/ +#include #include #include #include @@ -354,7 +355,7 @@ static int _pipe(int argc, char* argv[]) { // Break if we are done reading if (c == EOF) - break; + return errno; // Write the character to stdout r = fputc(c, stdout); @@ -367,8 +368,6 @@ static int _pipe(int argc, char* argv[]) { break; } } - - return 0; } /*