[GIT] ppl/ppl(master): Prefer explicit test against zero.

Module: ppl/ppl Branch: master Commit: 7b7ae1196e04b62461a77d98086479fad8712bc7 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=7b7ae1196e04b...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Sat Feb 25 11:17:06 2012 +0100
Prefer explicit test against zero. Detected by ECLAIR service utypflag.
---
src/checked_mpz.inlines.hh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/checked_mpz.inlines.hh b/src/checked_mpz.inlines.hh index 9b2c324..9b795d4 100644 --- a/src/checked_mpz.inlines.hh +++ b/src/checked_mpz.inlines.hh @@ -499,7 +499,7 @@ div_2exp_mpz(mpz_class& to, const mpz_class& x, unsigned int exp, PPL_ASSERT(round_up(dir)); mpz_cdiv_q_2exp(to.get_mpz_t(), n, exp); if (round_strict_relation(dir)) - return mpz_divisible_2exp_p(n, exp) ? V_EQ : V_LT; + return (mpz_divisible_2exp_p(n, exp) != 0) ? V_EQ : V_LT; return V_LE; } }
participants (1)
-
Enea Zaffanella