]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(factor): Don't list 1 as a factor of 1.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Dec 2004 21:11:59 +0000 (21:11 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Dec 2004 21:11:59 +0000 (21:11 +0000)
Problem reported by Thomas Folz-Donahue.

src/factor.c

index 9a30ce7718f2e074c4f06a00a8896e31da90e0cb..4b8f39ced3df3d7d46ce62ba7e7c77e1d98e84f2 100644 (file)
@@ -101,7 +101,7 @@ factor (uintmax_t n0, size_t max_n_factors, uintmax_t *factors)
   size_t n_factors = 0;
   unsigned char const *w = wheel_tab;
 
-  if (n < 1)
+  if (n <= 1)
     return n_factors;
 
   /* The exit condition in the following loop is correct because