summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-07-24 08:11:23 +0200
committerNeilBrown <neilb@suse.com>2015-07-24 08:11:23 +0200
commit27aefbdb3d52b9a4f4299b931003e4a8760b5dc2 (patch)
tree3a16c344866d024a4b4d3d3defa236cb063e7325 /managemon.c
parentbitmap: convert "inline" to "static inline" (diff)
downloadmdadm-27aefbdb3d52b9a4f4299b931003e4a8760b5dc2.tar.xz
mdadm-27aefbdb3d52b9a4f4299b931003e4a8760b5dc2.zip
Don't ignore return value from read and write
New gcc sometimes complains about this. Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/managemon.c b/managemon.c
index ec4586b2..6d1b3d85 100644
--- a/managemon.c
+++ b/managemon.c
@@ -410,7 +410,9 @@ static int sysfs_open2(char *devnum, char *name, char *attr)
* never needs too.
*/
char buf[200];
- read(fd, buf, sizeof(buf));
+ if (read(fd, buf, sizeof(buf)) < 0)
+ /* pretend not to ignore return value */
+ return fd;
}
return fd;
}