From 98cb6f30f708ef416572bf65bd26ac9f998ae0dc Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Wed, 22 Jul 2009 23:34:35 +0200 Subject: janitor: add DIV_ROUND_UP and use it. Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'help.c') diff --git a/help.c b/help.c index fd87bb5aee..6c46d8b494 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(" "); -- cgit v1.2.1