Commit 173f82442dbaf85ba99ecb0ac64d76170ba866e5

Authored by Danny Al-Gaaf
1 parent 1559c2b5
Exists in master and in 3 other branches v2, v3, wip-18092

gf_general.c: fix pointless expression

Instead of checking w128[0] twice check for w128[0] and w128[1].

Fix for coverity issue from Ceph project:

CID 1193072 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
 pointless_expression: The expression v1->w128[0] == v2->w128[0] &&
 v1->w128[0] == v2->w128[0] does not accomplish anything because it
 evaluates to either of its identical operands, v1->w128[0] == v2->w128[0].
 Did you intend the operands to be different?

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/gf_general.c
... ... @@ -240,7 +240,7 @@ int gf_general_are_equal(gf_general_t *v1, gf_general_t *v2, int w)
240 240 return (v1->w64 == v2->w64);
241 241 } else {
242 242 return (v1->w128[0] == v2->w128[0] &&
243   - v1->w128[0] == v2->w128[0]);
  243 + v1->w128[1] == v2->w128[1]);
244 244 }
245 245 }
246 246  
... ...