Author: mturk
Date: Sat Aug 19 03:10:17 2006
New Revision: 432824

URL: http://svn.apache.org/viewvc?rev=432824&view=rev
Log:
Check the return value from fwrite.
It both solves compile time warnings and skips
the flush in case of error.

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?rev=432824&r1=432823&r2=432824&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Sat Aug 19 03:10:17 2006
@@ -190,9 +190,10 @@
         size_t sz = strlen(what);
         if (sz) {
             file_logger_t *p = l->logger_private;
-            fwrite(what, 1, sz, p->logfile);
-            /* [V] Flush the dam' thing! */
-            fflush(p->logfile);
+            if (fwrite(what, 1, sz, p->logfile)) {
+                /* [V] Flush the dam' thing! */
+                fflush(p->logfile);
+            }
         }
 
         return JK_TRUE;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to