alexk / rpms / rpm

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