]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (gpt) fix N-1 error for partition size
authorKarel Zak <kzak@redhat.com>
Tue, 14 Oct 2014 15:26:27 +0000 (17:26 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Oct 2014 15:26:27 +0000 (17:26 +0200)
The same bug like on dos.c, the limits for the "last sector" dialog
are already with "-1".

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/gpt.c

index f23e7f6e87409b04940dcadd34f2ae71231ee8fd..e695bea9d37f9d84ce6b561d3603ee2b7af885c2 100644 (file)
@@ -2031,8 +2031,7 @@ static int gpt_add_partition(
                                if (user_l + (cxt->grain / cxt->sector_size) > dflt_l)
                                        user_l = dflt_l;
                                */
-                       } else
-                               user_l -= 1;
+                       }
 
                        if (user_l > user_f && user_l <= disk_l)
                                break;