Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Apr 2016 20:05:23 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r298862 - head/sbin/restore
Message-ID:  <201604302005.u3UK5NvY047890@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604302005.u3UK5NvY047890>