From: Paul Eggert Date: Tue, 7 Dec 2004 21:11:59 +0000 (+0000) Subject: (factor): Don't list 1 as a factor of 1. X-Git-Tag: v5.3.0~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f84a6e71fe8406b20fe0829221d5d3ae95afa7e2;p=thirdparty%2Fcoreutils.git (factor): Don't list 1 as a factor of 1. Problem reported by Thomas Folz-Donahue. --- diff --git a/src/factor.c b/src/factor.c index 9a30ce7718..4b8f39ced3 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