From: NeilBrown Date: Tue, 21 May 2013 05:41:25 +0000 (+1000) Subject: Grow.c remove some pointless casts on 'data_offset'. X-Git-Tag: mdadm-3.3-rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec787874d93fe14786c3f86d42ed0c19ecc650df;p=thirdparty%2Fmdadm.git Grow.c remove some pointless casts on 'data_offset'. 'data_offset' is 'unsigned long long' so the cast is pointless. Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 5ee97ca2..a1dc9613 100644 --- a/Grow.c +++ b/Grow.c @@ -2193,8 +2193,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st, if (data_offset == INVALID_SECTORS) info2.new_data_offset = info2.data_offset + min; else { - if ((unsigned long long)data_offset - < info2.data_offset + min) { + if (data_offset < info2.data_offset + min) { pr_err("--data-offset too small for %s\n", dn); goto release; @@ -2211,8 +2210,7 @@ static int set_new_data_offset(struct mdinfo *sra, struct supertype *st, if (data_offset == INVALID_SECTORS) info2.new_data_offset = info2.data_offset - min; else { - if ((unsigned long long)data_offset - > info2.data_offset - min) { + if (data_offset > info2.data_offset - min) { pr_err("--data-offset too large for %s\n", dn); goto release;