summaryrefslogtreecommitdiff
path: root/Monitor.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2006-05-29 02:06:32 +0000
committerNeil Brown <neilb@suse.de>2006-05-29 02:06:32 +0000
commit9fca7d6236e9775d0269b9802f740c08db46f4d7 (patch)
treeaef0c99d844a3eacf037294e6722079c01c44ae9 /Monitor.c
parent280a927d3d8da258a70df13df4f780d823fc1da2 (diff)
downloadmdadm-9fca7d6236e9775d0269b9802f740c08db46f4d7.tar.gz
check return status of all write/fwrite functions as required by glibc 2.4
From: Luca Berra <bluca@vodka.it> glibc 2.4 is pedantic on ignoring return values from fprintf, fwrite and write, so now we check the rval and actually do something with it. in the Grow.c case i only print a warning, since i don't think we can do anything in case we fail invalidating those superblocks (is should never happen, but then...) Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Monitor.c b/Monitor.c
index 7314cdc..246b9c5 100644
--- 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);