From: sooyeon Date: Mon, 17 Jan 2022 19:01:48 +0000 (+0900) Subject: Fix coverity issue to check whether the file is exist or not X-Git-Tag: submit/tizen/20230817.044630~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F11%2F269511%2F3;p=platform%2Fcore%2Fapi%2Fgesture.git Fix coverity issue to check whether the file is exist or not Change-Id: I50244a3c23a3272298cde3bcb7497f793df7a81e Signed-off-by: sooyeon --- diff --git a/engine/gesture_engine_dbus.c b/engine/gesture_engine_dbus.c index a0ec977..b22bcad 100644 --- a/engine/gesture_engine_dbus.c +++ b/engine/gesture_engine_dbus.c @@ -574,9 +574,9 @@ int gesture_engine_dbus_send_error(GDBusConnection *gdbus_connection, gesture_e ret = gdbus_send_message_with_sync(gdbus_connection, body, &reply, GESTURE_ENGINE_MSG_SEND_ERROR); if (ret == GESTURE_ENGINE_ERROR_NONE) { - gchar *msg = g_dbus_message_print (reply, 1); - LOGD("Reply msg print : %s", msg); - g_free(msg); + gchar *tmsg = g_dbus_message_print (reply, 1); + LOGD("Reply msg print : %s", tmsg); + g_free(tmsg); } if (body) diff --git a/server/gestured_dbus.c b/server/gestured_dbus.c index 10f5922..391653e 100644 --- a/server/gestured_dbus.c +++ b/server/gestured_dbus.c @@ -559,15 +559,9 @@ int gestured_register_dbus_interface(void) int ret = 0; snprintf(xml_file_path, 256, "%s/capi-ui-gesture-gdbus.xml", GESTURE_SHARED_RESOURCE_PATH); - ret = access(xml_file_path, R_OK); - if (0 != ret) { - LOGE("Introspection file is not exist. path(%s)", xml_file_path); - return GESTURED_ERROR_OPERATION_FAILED; - } - xml_file = fopen(xml_file_path, "r"); if (NULL == xml_file) { - LOGE("Fail to open introspection file"); + LOGE("Fail to open introspection file. path(%s)", xml_file_path); return GESTURED_ERROR_OPERATION_FAILED; }