summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2009-07-22 21:34:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-07-23 04:57:41 (GMT)
commit98cb6f30f708ef416572bf65bd26ac9f998ae0dc (patch)
treebed685d6c61a21dd9884a97606df16f1697408d0 /help.c
parentf630cfda8800aee03c7eb2fcd0f840730fbe43b9 (diff)
downloadgit-98cb6f30f708ef416572bf65bd26ac9f998ae0dc.zip
git-98cb6f30f708ef416572bf65bd26ac9f998ae0dc.tar.gz
git-98cb6f30f708ef416572bf65bd26ac9f998ae0dc.tar.bz2
janitor: add DIV_ROUND_UP and use it.
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
-rw-r--r--help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/help.c b/help.c
index fd87bb5..6c46d8b 100644
--- a/help.c
+++ b/help.c
@@ -100,7 +100,7 @@ static void pretty_print_string_list(struct cmdnames *cmds, int longest)
if (space < max_cols)
cols = max_cols / space;
- rows = (cmds->cnt + cols - 1) / cols;
+ rows = DIV_ROUND_UP(cmds->cnt, cols);
for (i = 0; i < rows; i++) {
printf(" ");