]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Jun 2009 12:09:00 +0000 (00:09 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Jun 2009 12:09:00 +0000 (00:09 +1200)
Prevent "make check" failure on warn_unused_result warning for fwrite(3) call.

tools/squidclient.cc

index 190e88f519c6e4cf1c5bb080ef3488bd2e497d63..3549c1c9530442ea6346baba3fcccd03012fd69d 100644 (file)
@@ -569,8 +569,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_