From 68aea93d91071bbebc3517dedc05cce09a8958ae Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Mon, 1 Apr 2019 16:48:53 +0900 Subject: [PATCH] Fix defects detected by static analysis tool Change-Id: I8c736e850542d6a2c51dc8f83951290539c3d493 --- client/ma.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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); -- 2.34.1