summaryrefslogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index 5d5711c..66be82a 100644
--- a/util.c
+++ b/util.c
@@ -1478,11 +1478,11 @@ int mdmon_pid(int devnum)
fd = open(path, O_RDONLY | O_NOATIME, 0);
if (fd < 0)
- return 0;
+ return -1;
n = read(fd, pid, 9);
close(fd);
if (n <= 0)
- return 0;
+ return -1;
return atoi(pid);
}