From: Karel Zak Date: Tue, 14 Oct 2014 14:44:54 +0000 (+0200) Subject: libfdisk: (dos) fix N-1 error for partition size X-Git-Tag: v2.26-rc1~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a389baf116834b2664288ef7934dd0fd80b1c836;p=thirdparty%2Futil-linux.git libfdisk: (dos) fix N-1 error for partition size Signed-off-by: Karel Zak --- diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index f489fdf172..0ce032867d 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -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));