Fix defects detected by static analysis tool 85/202585/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 1 Apr 2019 07:48:53 +0000 (16:48 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 1 Apr 2019 07:48:53 +0000 (16:48 +0900)
Change-Id: I8c736e850542d6a2c51dc8f83951290539c3d493

client/ma.c

index 3028450575e9fbc96d49920ca18aa9a1444805d0..c6563efd512e18073e5331f7b8cee13247903405 100644 (file)
@@ -297,9 +297,19 @@ static Eina_Bool __ma_connect_daemon(void *data)
 
                ma_state_e prev_state;
                ma_active_state_e active_state;
-               ma_client_get_client_state(g_ma, &prev_state);
-               ma_client_get_client_active_state(g_ma, &active_state);
-               ma_client_set_client_state(g_ma, MA_STATE_READY);
+               int ret = MA_ERROR_NONE;
+               ret = ma_client_get_client_state(g_ma, &prev_state);
+               if (MA_ERROR_NONE != ret) {
+                       SLOG(LOG_ERROR, TAG_MAC, "[ERROR] Fail to get client state : %d", ret);
+               }
+               ret = ma_client_get_client_active_state(g_ma, &active_state);
+               if (MA_ERROR_NONE != ret) {
+                       SLOG(LOG_ERROR, TAG_MAC, "[ERROR] Fail to get client active state : %d", ret);
+               }
+               ret = ma_client_set_client_state(g_ma, MA_STATE_READY);
+               if (MA_ERROR_NONE != ret) {
+                       SLOG(LOG_ERROR, TAG_MAC, "[ERROR] Fail to set client state : %d", ret);
+               }
                __ma_notify_state_changed(g_ma);
 
                ma_client_set_ui_pid(g_ma, ui_pid);