]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow.c remove some pointless casts on 'data_offset'.
authorNeilBrown <neilb@suse.de>
Tue, 21 May 2013 05:41:25 +0000 (15:41 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 21 May 2013 05:41:25 +0000 (15:41 +1000)
'data_offset' is 'unsigned long long' so the cast is pointless.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 5ee97ca29105e41c24415ae9c0ff8eb673d06801..a1dc96133e6b4af75c49581d58558a9d1a931699 100644 (file)
--- 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;