From owner-svn-src-all@freebsd.org Mon May 2 00:44:20 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C504AD9A8C; Mon, 2 May 2016 00:44:20 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF3E1365; Mon, 2 May 2016 00:44:20 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u420iJTm069740; Mon, 2 May 2016 00:44:19 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u420iJZo069739; Mon, 2 May 2016 00:44:19 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201605020044.u420iJZo069739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Mon, 2 May 2016 00:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298905 - head/sbin/growfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2016 00:44:20 -0000 Author: araujo Date: Mon May 2 00:44:19 2016 New Revision: 298905 URL: https://svnweb.freebsd.org/changeset/base/298905 Log: Use MIN() macro from sys/param.h. Reviewed by: trasz MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D6119 Modified: head/sbin/growfs/growfs.c Modified: head/sbin/growfs/growfs.c ============================================================================== --- head/sbin/growfs/growfs.c Sun May 1 22:00:41 2016 (r298904) +++ head/sbin/growfs/growfs.c Mon May 2 00:44:19 2016 (r298905) @@ -348,8 +348,7 @@ initcg(int cylno, time_t modtime, int fs acg.cg_magic = CG_MAGIC; acg.cg_cgx = cylno; acg.cg_niblk = sblock.fs_ipg; - acg.cg_initediblk = sblock.fs_ipg < 2 * INOPB(&sblock) ? - sblock.fs_ipg : 2 * INOPB(&sblock); + acg.cg_initediblk = MIN(sblock.fs_ipg, 2 * INOPB(&sblock)); acg.cg_ndblk = dmax - cbase; if (sblock.fs_contigsumsize > 0) acg.cg_nclusterblks = acg.cg_ndblk / sblock.fs_frag;