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

[Cluster-devel] [PATCH 19/41] 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


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