]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF (cleanup): use a common macro for failed searches
authormwilck@arcor.de <mwilck@arcor.de>
Wed, 3 Jul 2013 20:27:41 +0000 (22:27 +0200)
committerNeilBrown <neilb@suse.de>
Mon, 8 Jul 2013 05:28:30 +0000 (15:28 +1000)
Use DDF_NOTFOUND instead of NO_SUCH_REFNUM.

Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index 56aad684db8c8ddc491fb1e080c87b2cd31c7d1f..91feb87cc97e663b19d82f87366f20dd80187168 100644 (file)
@@ -3257,7 +3257,6 @@ static int check_secondary(const struct vcl *vc)
        return 0;
 }
 
-#define NO_SUCH_REFNUM (0xFFFFFFFF)
 static unsigned int get_pd_index_from_refnum(const struct vcl *vc,
                                             __u32 refnum, unsigned int nmax,
                                             const struct vd_config **bvd,
@@ -3298,7 +3297,7 @@ static unsigned int get_pd_index_from_refnum(const struct vcl *vc,
        }
 bad:
        *bvd = NULL;
-       return NO_SUCH_REFNUM;
+       return DDF_NOTFOUND;
 }
 
 static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray)
@@ -3414,7 +3413,7 @@ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray
                        i = get_pd_index_from_refnum(
                                vc, ddf->phys->entries[pd].refnum,
                                ddf->mppe, &bvd, &iphys);
-                       if (i == NO_SUCH_REFNUM)
+                       if (i == DDF_NOTFOUND)
                                continue;
 
                        this->array.working_disks++;