diff options
author | Niels Möller <nisse@lysator.liu.se> | 2012-01-15 23:34:29 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2012-01-15 23:34:29 +0100 |
commit | ad4b7e4333eb02e7b075b5f75683657fb8300f0e (patch) | |
tree | f18263f744524d15b279ec1b40a1d5c6879ca32a /mpz/scan1.c | |
parent | 5e44288aed2134c88e7f6692ef20ddec8d24c414 (diff) | |
download | gmp-ad4b7e4333eb02e7b075b5f75683657fb8300f0e.tar.gz |
Don't use ULONG_MAX as a mp_bitcnt_t constant.
Diffstat (limited to 'mpz/scan1.c')
-rw-r--r-- | mpz/scan1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/scan1.c b/mpz/scan1.c index dfc9201c8..5781d7481 100644 --- a/mpz/scan1.c +++ b/mpz/scan1.c @@ -42,7 +42,7 @@ mpz_scan1 (mpz_srcptr u, mp_bitcnt_t starting_bit) __GMP_NOTHROW /* Past the end there's no 1 bits for u>=0, or an immediate 1 bit for u<0. Notice this test picks up any u==0 too. */ if (starting_limb >= abs_size) - return (size >= 0 ? ULONG_MAX : starting_bit); + return (size >= 0 ? ~(mp_bitcnt_t) 0 : starting_bit); limb = *p; @@ -57,7 +57,7 @@ mpz_scan1 (mpz_srcptr u, mp_bitcnt_t starting_bit) __GMP_NOTHROW no 1 bits after starting_bit. */ p++; if (p == u_end) - return ULONG_MAX; + return ~(mp_bitcnt_t) 0; /* Otherwise search further for a non-zero limb. The high limb is non-zero, if nothing else. */ |