]> 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:44:45 +0000 (00:44 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Jun 2009 12:44:45 +0000 (00:44 +1200)
Prevent "make check" failure on warn_unused_result warning for fwrite(3) call.

tools/squidclient.cc

index 5edb326f4434a9f88791c8c6d1b42577e1d3421e..218911423fa63f95db7d33f2f979e503f4e03aa9 100644 (file)
@@ -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_