Fix coverity issue to check whether the file is exist or not 11/269511/3
authorsooyeon <sooyeon.kim@samsung.com>
Mon, 17 Jan 2022 19:01:48 +0000 (04:01 +0900)
committersooyeon <sooyeon.kim@samsung.com>
Mon, 17 Jan 2022 19:45:46 +0000 (04:45 +0900)
Change-Id: I50244a3c23a3272298cde3bcb7497f793df7a81e
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
engine/gesture_engine_dbus.c
server/gestured_dbus.c

index a0ec97790c9cc100b0105e09b149339c437e0127..b22bcad20548b2ec5e50b694ef0196a991c297ad 100644 (file)
@@ -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)
index 10f59220c37f3bcdce737131ec28b07976b47694..391653ea4954545ecadc62d09e90f3e6a55088aa 100644 (file)
@@ -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;
        }