diff options
author | ae <ae@FreeBSD.org> | 2011-11-06 19:03:07 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2011-11-06 19:03:07 +0000 |
commit | e81522e7f12c28f031e9c5d387e982727249f31b (patch) | |
tree | 95ea34a506c0b1f6b1d2b6720d34dcab3e232132 /sbin | |
parent | 7d6a47f31cfc10f8120d161301794b5dcf6f10b4 (diff) | |
download | FreeBSD-src-e81522e7f12c28f031e9c5d387e982727249f31b.zip FreeBSD-src-e81522e7f12c28f031e9c5d387e982727249f31b.tar.gz |
Remove unneeded checks.
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/bsdlabel/bsdlabel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 4f5a2c6..50f5769 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; } |