From eb6acaa598bb4cf90df1d5d996bbd801ea98e0dd Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 15 Jun 2009 00:44:45 +1200 Subject: [PATCH] Author: Alex Rousskov Prevent "make check" failure on warn_unused_result warning for fwrite(3) call. --- tools/squidclient.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/squidclient.cc b/tools/squidclient.cc index 5edb326f44..218911423f 100644 --- a/tools/squidclient.cc +++ b/tools/squidclient.cc @@ -513,8 +513,8 @@ main(int argc, char *argv[]) while ((len = myread(conn, buf, sizeof(buf))) > 0) { fsize += len; - if (to_stdout) - fwrite(buf, len, 1, stdout); + if (to_stdout && fwrite(buf, len, 1, stdout) != 1) + perror("client: ERROR writing to stdout"); } #ifdef _SQUID_MSWIN_ -- 2.47.2