From: mwilck@arcor.de Date: Wed, 3 Jul 2013 20:27:41 +0000 (+0200) Subject: DDF (cleanup): use a common macro for failed searches X-Git-Tag: mdadm-3.3-rc2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6e7b0837d2df79b0337618ae529ed2f4b409b2e;p=thirdparty%2Fmdadm.git DDF (cleanup): use a common macro for failed searches Use DDF_NOTFOUND instead of NO_SUCH_REFNUM. Signed-off-by: Martin Wilck Signed-off-by: NeilBrown --- diff --git a/super-ddf.c b/super-ddf.c index 56aad684..91feb87c 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -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++;