Author: ae
Date: Sun Nov 6 19:03:07 2011
New Revision: 227262
URL: http://svn.freebsd.org/changeset/base/227262
Log:
Remove unneeded checks.
MFC after: 1 week
Modified:
head/sbin/bsdlabel/bsdlabel.c
Modified: head/sbin/bsdlabel/bsdlabel.c
==============================================================================
--- head/sbin/bsdlabel/bsdlabel.c Sun Nov 6 19:02:49 2011
(r227261)
+++ head/sbin/bsdlabel/bsdlabel.c Sun Nov 6 19:03:07 2011
(r227262)
@@ -831,7 +831,7 @@ getasciilabel(FILE *f, struct disklabel
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;
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"