From: Jaehyun Kim Date: Mon, 17 Feb 2020 12:06:15 +0000 (+0900) Subject: Fix branch past initialization issue X-Git-Tag: submit/tizen/20200220.041614^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F225127%2F1;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Fix branch past initialization issue Change-Id: I250d6815e939b0e7d33b6a98efc1b3157135fa10 Signed-off-by: Jaehyun Kim --- diff --git a/src/ip-conflict-detect.c b/src/ip-conflict-detect.c index 2aad203..b21d958 100755 --- a/src/ip-conflict-detect.c +++ b/src/ip-conflict-detect.c @@ -152,6 +152,7 @@ static gboolean __netconfig_check_arp_receive(GIOChannel *source, char sbuf[WLAN_MAC_ADDR_MAX]; char tbuf[WLAN_MAC_ADDR_MAX]; const char *default_ip = NULL; + int mac_cmp = 0; if (g_io_channel_read_chars(source, buffer, ARP_PACKET_SIZE, &bytes_read, NULL) == G_IO_STATUS_NORMAL) { @@ -181,7 +182,7 @@ static gboolean __netconfig_check_arp_receive(GIOChannel *source, goto skip; } DBG("our mac= %s source mac= %s target mac= %s", netconfig_get_default_mac_address(), sbuf, tbuf); - int mac_cmp = strcmp(tbuf , netconfig_get_default_mac_address()); + mac_cmp = strcmp(tbuf , netconfig_get_default_mac_address()); if (mac_cmp != 0) { INFO("Packet not intended to us.\n"); goto out;