FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-23-2011, 09:15 AM
"Fabio M. Di Nitto"
 
Default 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
 

Thread Tools




All times are GMT. The time now is 09:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org