summaryrefslogtreecommitdiff
path: root/Incremental.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2011-11-03 08:08:00 +1100
committerNeilBrown <neilb@suse.de>2011-11-03 08:08:00 +1100
commitf56128b9bc8e080ea576b0c1cbf0cb40cfc0b657 (patch)
tree615de8ea4417db6cc7a059c38272eaf0abf2a2e5 /Incremental.c
parent99f6e521592f06e7db0a2069c270dd6f9a5e2e89 (diff)
array_try_spare(): open_dev() returns -1 on error, not zero
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Incremental.c')
-rw-r--r--Incremental.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Incremental.c b/Incremental.c
index c2c90519..d3724a48 100644
--- a/Incremental.c
+++ b/Incremental.c
@@ -884,7 +884,7 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol,
* to obtain minimum spare size */
struct supertype *st3 = dup_super(st2);
int mdfd = open_dev(mp->devnum);
- if (!mdfd) {
+ if (mdfd < 0) {
free(st3);
goto next;
}