teknoraver / rpms / rpm

Forked from rpms/rpm 3 months ago
Clone

Blame SOURCES/rpm-4.8.x-error-in-log.patch

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