From: Jim Meyering Date: Tue, 3 Feb 2004 18:40:25 +0000 (+0000) Subject: (print_numbers): Use 'double' for loop index, not X-Git-Tag: v5.1.3~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8416c5e12473f009eeaa25d699a5470bc005f3c;p=thirdparty%2Fcoreutils.git (print_numbers): Use 'double' for loop index, not 'int', to avoid problems with integer overflow. On almost all machines 'double' works in every case where 'int' works, and it works on other cases besides. --- diff --git a/src/seq.c b/src/seq.c index 0394c35e38..93147ca2cf 100644 --- a/src/seq.c +++ b/src/seq.c @@ -181,7 +181,7 @@ valid_format (const char *fmt) static void print_numbers (const char *fmt) { - int i; + double i; for (i = 0; /* empty */; i++) {