[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 25/41] qdiskd: use correct sizeof for memb_mask_t



Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto redhat com>
---
:100644 100644 d613d84... 01aa199... M	cman/qdisk/main.c
 cman/qdisk/main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index d613d84..01aa199 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -609,12 +609,12 @@ check_cman(qd_ctx *ctx, memb_mask_t mask, memb_mask_t master_mask)
 			   &retnodes, nodes) <0 )
 		return;
 
-	memset(master_mask, 0, sizeof(master_mask));
+	memset(master_mask, 0, sizeof(memb_mask_t));
 	for (x = 0; x < retnodes; x++) {
-		if (is_bit_set(mask, nodes[x].cn_nodeid-1, sizeof(mask)) &&
+		if (is_bit_set(mask, nodes[x].cn_nodeid-1, sizeof(memb_mask_t)) &&
 		    nodes[x].cn_member) {
 			set_bit(master_mask, nodes[x].cn_nodeid-1,
-				sizeof(master_mask));
+				sizeof(memb_mask_t));
 		} else {
 			/* Not in CMAN output = not allowed */
 			clear_bit(master_mask, (nodes[x].cn_nodeid-1),
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]