]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Monitor.c
Allow domain_test to report that no domains were found.
[thirdparty/mdadm.git] / Monitor.c
index adc89d080a5bf7fd196953469b0c0d6a581760a9..452f62d8d1b13cc78ee6c7897c1f135ebf6fb30f 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -778,7 +778,7 @@ static dev_t choose_spare(struct state *from, struct state *to,
                        if (from->spare_group)
                                pol_add(&pol, pol_domain,
                                        from->spare_group, NULL);
-                       if (domain_test(domlist, pol, to->metadata->ss->name))
+                       if (domain_test(domlist, pol, to->metadata->ss->name) == 1)
                            dev = from->devid[d];
                        dev_policy_free(pol);
                }