svn commit: r298862 - head/sbin/restore
Pedro F. Giffuni
pfg at FreeBSD.org
Sat Apr 30 20:05:24 UTC 2016
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];
More information about the svn-src-head
mailing list