]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Prevent "make check" failure on warn_unused_result warning for fwrite(3) call.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 12 Jun 2009 15:15:33 +0000 (09:15 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 12 Jun 2009 15:15:33 +0000 (09:15 -0600)
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_