]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Monitor.c
check return status of all write/fwrite functions as required by glibc 2.4
[thirdparty/mdadm.git] / Monitor.c
index 7314cdcd2b780366b1f66cd7eff1ffbb435407ac..246b9c501d1fcbe378eedc543106fd8171c8921e 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -521,7 +521,7 @@ static void alert(char *event, char *dev, char *disc, char *mailaddr, char *mail
                                int n;
                                fprintf(mp, "\nP.S. The /proc/mdstat file current contains the following:\n\n");
                                while ( (n=fread(buf, 1, sizeof(buf), mdstat)) > 0)
-                                       fwrite(buf, 1, n, mp);
+                                       n=fwrite(buf, 1, n, mp); /* yes, i don't care about the result */
                                fclose(mdstat);
                        }
                        fclose(mp);