diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-12-07 21:11:59 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-12-07 21:11:59 +0000 |
commit | f84a6e71fe8406b20fe0829221d5d3ae95afa7e2 (patch) | |
tree | 5897106898ce53ba302b0afc5997648179de545d /src | |
parent | 29a74f8a308cd20ab716e1579453a1ce8337f41e (diff) | |
download | coreutils-f84a6e71fe8406b20fe0829221d5d3ae95afa7e2.tar.xz |
(factor): Don't list 1 as a factor of 1.
Problem reported by Thomas Folz-Donahue.
Diffstat (limited to 'src')
-rw-r--r-- | src/factor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/factor.c b/src/factor.c index 9a30ce771..4b8f39ced 100644 --- a/src/factor.c +++ b/src/factor.c @@ -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 |