From: Karel Zak Date: Thu, 21 Mar 2013 07:12:35 +0000 (+0100) Subject: fdisk: remove unwanted operator [smatch scan] X-Git-Tag: v2.23-rc1~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46e7eac1216003df98fe9d8166f9fe52f76192d6;p=thirdparty%2Futil-linux.git fdisk: remove unwanted operator [smatch scan] Reported-by: Sami Kerola Signed-off-by: Karel Zak --- diff --git a/fdisks/fdisksunlabel.c b/fdisks/fdisksunlabel.c index 66f459bf53..2226f4c778 100644 --- a/fdisks/fdisksunlabel.c +++ b/fdisks/fdisksunlabel.c @@ -314,7 +314,7 @@ static int sun_toggle_partition_flag(struct fdisk_context *cxt, size_t i, unsign assert(cxt->label); assert(fdisk_is_disklabel(cxt, SUN)); - if (!i >= cxt->label->nparts_max) + if (i >= cxt->label->nparts_max) return -EINVAL; sunlabel = self_disklabel(cxt);