libfdisk: fix add_logical() assert

The zero index is absolutely valid for extended partition (it means
extended partition could be the first partition on the device).

Reported-by: Christoph Hoopmann <christophhoopmann@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2014-10-07 11:33:46 +02:00
parent 8d72c980f5
commit 60ba8c362d
1 changed files with 0 additions and 1 deletions

View File

@ -1158,7 +1158,6 @@ static int add_logical(struct fdisk_context *cxt, struct fdisk_partition *pa)
assert(cxt);
assert(cxt->label);
assert(self_label(cxt)->ext_offset);
assert(self_label(cxt)->ext_index);
DBG(LABEL, ul_debug("DOS: nparts max: %zu", cxt->label->nparts_max));
pe = self_pte(cxt, cxt->label->nparts_max);