Commit a197d340 by Martin Liska Committed by Martin Liska

Do not use bit and for conjunction of predicates (PR c/81272).

2018-02-19  Martin Liska  <mliska@suse.cz>

	PR c/81272
	* decNumber.c (decCompareOp): Do not use bit and
	for conjunction of predicates.

From-SVN: r257815
parent d48fc34a
2018-02-19 Martin Liska <mliska@suse.cz>
PR c/81272
* decNumber.c (decCompareOp): Do not use bit and
for conjunction of predicates.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
......
......@@ -6029,11 +6029,11 @@ decNumber * decCompareOp(decNumber *res, const decNumber *lhs,
/* If total ordering then handle differing signs 'up front' */
if (op==COMPTOTAL) { /* total ordering */
if (decNumberIsNegative(lhs) & !decNumberIsNegative(rhs)) {
if (decNumberIsNegative(lhs) && !decNumberIsNegative(rhs)) {
result=-1;
break;
}
if (!decNumberIsNegative(lhs) & decNumberIsNegative(rhs)) {
if (!decNumberIsNegative(lhs) && decNumberIsNegative(rhs)) {
result=+1;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment