richardphibel / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
5523e9
--- rpm-4.8.0/rpmio/rpmlog.c.error-in-log	2015-02-23 13:18:29.696116399 +0100
5523e9
+++ rpm-4.8.0/rpmio/rpmlog.c	2015-02-23 13:28:19.630394971 +0100
5523e9
@@ -127,10 +127,14 @@
5523e9
         break;
5523e9
     }
5523e9
 
5523e9
-    (void) fputs(rpmlogLevelPrefix(rec->pri), msgout);
5523e9
+    if (fputs(rpmlogLevelPrefix(rec->pri), msgout) == EOF)
5523e9
+	perror("Error occurred during writing of a log message");
5523e9
 
5523e9
-    (void) fputs(rec->message, msgout);
5523e9
-    (void) fflush(msgout);
5523e9
+    if (fputs(rec->message, msgout) == EOF)
5523e9
+	perror("Error occurred during writing of a log message");
5523e9
+
5523e9
+    if (fflush(msgout) == EOF)
5523e9
+	perror("Error occurred during writing of a log message");
5523e9
 
5523e9
     return (rec->pri <= RPMLOG_CRIT ? RPMLOG_EXIT : 0);
5523e9
 }