test-lib-functions.sh: remove misleading comment on test_seq
[gitweb.git] / pager.c
diff --git a/pager.c b/pager.c
index d40288b3e4c2574e6f05597efd1bc355c2a8593a..070dc11cb0c85abf07763de46a82e73dde6bded2 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -134,12 +134,12 @@ int term_columns(void)
 /*
  * How many columns do we need to show this number in decimal?
  */
-int decimal_width(int number)
+int decimal_width(uintmax_t number)
 {
-       int i, width;
+       int width;
 
-       for (width = 1, i = 10; i <= number; width++)
-               i *= 10;
+       for (width = 1; number >= 10; width++)
+               number /= 10;
        return width;
 }