From owner-svn-src-head@FreeBSD.ORG Sun Nov 6 19:03:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B04331065698; Sun, 6 Nov 2011 19:03:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A02B18FC2A; Sun, 6 Nov 2011 19:03:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6J37G7037296; Sun, 6 Nov 2011 19:03:07 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pA6J37Nx037294; Sun, 6 Nov 2011 19:03:07 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201111061903.pA6J37Nx037294@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 6 Nov 2011 19:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227262 - head/sbin/bsdlabel X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 19:03:07 -0000 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; }