]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (dos) fix N-1 error for partition size
authorKarel Zak <kzak@redhat.com>
Tue, 14 Oct 2014 14:44:54 +0000 (16:44 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Oct 2014 14:44:54 +0000 (16:44 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c

index f489fdf172adc5a85501ef8e68616da23ae92eeb..0ce032867d47f3e414b63e45765f26125ff5d4cc 100644 (file)
@@ -1127,8 +1127,7 @@ static int add_partition(struct fdisk_context *cxt, size_t n,
                        stop = stop * fdisk_get_units_per_sector(cxt) - 1;
                        if (stop >limit)
                                stop = limit;
-               } else
-                       stop -= 1;
+               }
        }
 
        DBG(LABEL, ul_debug("DOS: raw stop: %ju", (uintmax_t) stop));