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 cman: init structs before use

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 522994b... d632c17... M cman/daemon/cman-preconfig.c
cman/daemon/cman-preconfig.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cman/daemon/cman-preconfig.c b/cman/daemon/cman-preconfig.c
index 522994b..d632c17 100644
--- a/cman/daemon/cman-preconfig.c
+++ b/cman/daemon/cman-preconfig.c
@@ -295,6 +295,10 @@ static int add_ifaddr(struct objdb_iface_ver0 *objdb, char *mcast, char *ifaddr,
[TX_MECH_RDMA] = "iba",
};

+ memset(&mcast_addr, 0, sizeof(mcast_addr));
+ memset(&localhost, 0, sizeof(localhost));
+ memset(&if_addr, 0, sizeof(if_addr));
+
/* Check the families match */
if (address_family(mcast, &mcast_addr, 0) !=
address_family(ifaddr, &if_addr, mcast_addr.ss_family)) {
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 03:53 AM.

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