Date: Sun, 6 Nov 2011 19:03:07 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227262 - head/sbin/bsdlabel Message-ID: <201111061903.pA6J37Nx037294@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111061903.pA6J37Nx037294>