From: Ji-hoon Lee Date: Mon, 1 Apr 2019 07:48:53 +0000 (+0900) Subject: Fix defects detected by static analysis tool X-Git-Tag: submit/tizen/20190418.072452~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F202585%2F1;p=platform%2Fcore%2Fuifw%2Fmulti-assistant.git Fix defects detected by static analysis tool Change-Id: I8c736e850542d6a2c51dc8f83951290539c3d493 --- diff --git a/client/ma.c b/client/ma.c index 3028450..c6563ef 100644 --- a/client/ma.c +++ b/client/ma.c @@ -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);