summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2014-03-19 18:30:16 +0100
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2014-04-22 20:08:26 +0200
commit173f82442dbaf85ba99ecb0ac64d76170ba866e5 (patch)
treef5f73eb49d3c8393e938a7831443616d6d816253 /src
parent1559c2b51575c6ddd0005232e899ba1af4340610 (diff)
downloadgf-complete-173f82442dbaf85ba99ecb0ac64d76170ba866e5.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/gf_general.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gf_general.c b/src/gf_general.c
index b5ca7a9..8fcc737 100644
--- a/src/gf_general.c
+++ b/src/gf_general.c
@@ -240,7 +240,7 @@ int gf_general_are_equal(gf_general_t *v1, gf_general_t *v2, int w)
return (v1->w64 == v2->w64);
} else {
return (v1->w128[0] == v2->w128[0] &&
- v1->w128[0] == v2->w128[0]);
+ v1->w128[1] == v2->w128[1]);
}
}