From 6fb8385d2977e8994dfa262423e8bd013bfdb888 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 10 Jul 2017 17:17:34 +0200 Subject: [PATCH] avoid op on uninitialized value warnings --- src/utils/inetAddressUtil.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/inetAddressUtil.cpp b/src/utils/inetAddressUtil.cpp index c1b17b0..280fdcc 100644 --- a/src/utils/inetAddressUtil.cpp +++ b/src/utils/inetAddressUtil.cpp @@ -389,8 +389,10 @@ int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr * #endif else { // if it is a match, accept the interface even if it does not support broadcast (i.e. 127.0.0.1) - if (match) + if (match) { + memset(&node.ifaceBCast, 0, sizeof(node.ifaceBCast)); node.ifaceBCast.sa.sa_family = AF_UNSPEC; + } else { /*ifDepenDebugPrintf ( ( "discoverInterfaces(): net intf \"%s\": not point to point or bcast?\n", pIfreqList->ifr_name ) );*/