From 3608f6b8c756cb54cc73bf0edc1d3a98ac142642 Mon Sep 17 00:00:00 2001 From: "hyunuk.tak" Date: Fri, 22 Nov 2019 16:25:08 +0900 Subject: [PATCH] Fix some coverity 872459, 83456 Change-Id: I5049f2c806e398061b222264f49515209f5daf8a Signed-off-by: hyunuk.tak --- src/network_interface.c | 7 ++++++- src/network_signal.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/network_interface.c b/src/network_interface.c index 1b8a49e..9367e32 100755 --- a/src/network_interface.c +++ b/src/network_interface.c @@ -2112,7 +2112,12 @@ int net_wifi_power_on(gboolean wifi_picker_test) return NET_ERR_SECURITY_RESTRICTED; //LCOV_EXCL_LINE } - vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_state); + if (vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_state) != 0) { + WIFI_LOG(WIFI_ERROR, "Failed to get vconf key of hotspot mode"); //LCOV_EXCL_LINE + __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE + return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE + } + if (hotspot_state & VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) { WIFI_LOG(WIFI_ERROR, "Wi-Fi hotspot is enabled!"); //LCOV_EXCL_LINE __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE diff --git a/src/network_signal.c b/src/network_signal.c index be3639e..94c0951 100755 --- a/src/network_signal.c +++ b/src/network_signal.c @@ -1035,7 +1035,7 @@ static int __net_handle_wifi_tdls_discover_event(GVariant *param) GVariant *value = NULL; const char *key = NULL; const gchar *sig_value = NULL; - net_tdls_discover_s discover_info = {0, }; + net_tdls_discover_s discover_info = { 0, "" }; g_variant_get(param, "(a{sv})", &iter); -- 2.7.4