From owner-svn-src-head@freebsd.org Sat Apr 30 20:05:24 2016 Return-Path: Delivered-To: svn-src-head@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 C946FB22617; Sat, 30 Apr 2016 20:05:24 +0000 (UTC) (envelope-from pfg@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 8B66912B9; Sat, 30 Apr 2016 20:05:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3UK5NhT047891; Sat, 30 Apr 2016 20:05:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3UK5NvY047890; Sat, 30 Apr 2016 20:05:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201604302005.u3UK5NvY047890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 30 Apr 2016 20:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298862 - head/sbin/restore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 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: Sat, 30 Apr 2016 20:05:24 -0000 Author: pfg Date: Sat Apr 30 20:05:23 2016 New Revision: 298862 URL: https://svnweb.freebsd.org/changeset/base/298862 Log: restore: use our howmany() instead of reinventing the macro. Modified: head/sbin/restore/interactive.c Modified: head/sbin/restore/interactive.c ============================================================================== --- head/sbin/restore/interactive.c Sat Apr 30 19:58:54 2016 (r298861) +++ head/sbin/restore/interactive.c Sat Apr 30 20:05:23 2016 (r298862) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #include "restore.h" #include "extern.h" -#define round(a, b) (((a) + (b) - 1) / (b) * (b)) - /* * Things to handle interruptions. */ @@ -671,7 +669,7 @@ formatf(struct afile *list, int nentry) columns = 81 / width; if (columns == 0) columns = 1; - lines = (nentry + columns - 1) / columns; + lines = howmany(nentry, columns); for (i = 0; i < lines; i++) { for (j = 0; j < columns; j++) { fp = &list[j * lines + i];