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

Module: ppl/ppl Branch: master Commit: 02eb888f14e01881c56274ed8009d6c5aa3d8e41 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=02eb888f14e01...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Sat Feb 25 13:34:55 2012 +0100
Prefer explicit test against zero. Detected by ECLAIR service utypflag.
---
interfaces/C/ppl_interface_generator_c_cc_code.m4 | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/interfaces/C/ppl_interface_generator_c_cc_code.m4 b/interfaces/C/ppl_interface_generator_c_cc_code.m4 index 43d971e..87d446d 100644 --- a/interfaces/C/ppl_interface_generator_c_cc_code.m4 +++ b/interfaces/C/ppl_interface_generator_c_cc_code.m4 @@ -41,7 +41,8 @@ ppl_new_@TOPOLOGY@@CLASS@_from_space_dimension (ppl_@CLASS@_t* pph, ppl_dimension_type d, int empty) try { - *pph = to_nonconst(new @TOPOLOGY@@CPP_CLASS@(d, empty ? EMPTY : UNIVERSE)); + Degenerate_Element e = (empty != 0) ? EMPTY : UNIVERSE; + *pph = to_nonconst(new @TOPOLOGY@@CPP_CLASS@(d, e)); return 0; } CATCH_ALL
participants (1)
-
Enea Zaffanella