From b11075cdeb662e3d9b9ead5064a55566746d09b9 Mon Sep 17 00:00:00 2001 From: "Andrey V. Elsukov" Date: Sun, 6 Nov 2011 19:03:07 +0000 Subject: Remove unneeded checks. MFC after: 1 week --- sbin/bsdlabel/bsdlabel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sbin/bsdlabel/bsdlabel.c') diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 4f5a2c6a3fcd..50f576969fdc 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -831,7 +831,7 @@ getasciilabel(FILE *f, struct disklabel *lp) continue; } if (sscanf(cp, "%lu partitions", &v) == 1) { - if (v == 0 || v > MAXPARTITIONS) { + if (v > MAXPARTITIONS) { fprintf(stderr, "line %d: bad # of partitions\n", lineno); lp->d_npartitions = MAXPARTITIONS; @@ -1186,8 +1186,7 @@ checklabel(struct disklabel *lp) lp->d_secperunit = vl->d_secperunit; if (lp->d_bbsize == 0) lp->d_bbsize = vl->d_bbsize; - if (lp->d_npartitions == 0 || - lp->d_npartitions < DEFPARTITIONS || + if (lp->d_npartitions < DEFPARTITIONS || lp->d_npartitions > MAXPARTITIONS) lp->d_npartitions = vl->d_npartitions; } -- cgit v1.2.3