summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiwoong Im <jiwoong.im@samsung.com>2017-04-10 17:10:14 +0900
committerJiwoong Im <jiwoong.im@samsung.com>2017-04-10 01:36:39 -0700
commit0c6aab54f4d76ad3d606eae4efadb24d5311158a (patch)
tree40d79873a764c575ad3550f3c86f8e6e5ce8a811
parent92a6a27ba031f23740123f19ded4d3d20ba0428a (diff)
downloadui-gadget-1-0c6aab54f4d76ad3d606eae4efadb24d5311158a.tar.gz
ui-gadget-1-0c6aab54f4d76ad3d606eae4efadb24d5311158a.tar.bz2
ui-gadget-1-0c6aab54f4d76ad3d606eae4efadb24d5311158a.zip
Fix unreachable code
Change-Id: I4ee12f22cda7e1b0386f74476a6a48380ddebe2b Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com> (cherry picked from commit ec8263d88bb0ec31e8119fd13dee366a1b2f0f3c)
-rw-r--r--client/ug-client.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/client/ug-client.c b/client/ug-client.c
index 72fb0ed..9ffc2cd 100644
--- a/client/ug-client.c
+++ b/client/ug-client.c
@@ -164,8 +164,15 @@ void _ug_client_result_cb(ui_gadget_h ug, app_control_h reply, void *priv)
char* value = NULL;
int result;
- if (!ug || !priv)
+ if (!ug) {
+ LOGE("ug is null");
+ return;
+ }
+
+ if (!priv) {
+ LOGE("appdata is null");
return;
+ }
ret = app_control_get_extra_data(reply, UG_APP_CONTROL_DATA_RESULT, &value);
if ((ret == APP_CONTROL_ERROR_NONE) && (value)) {
@@ -180,10 +187,6 @@ void _ug_client_result_cb(ui_gadget_h ug, app_control_h reply, void *priv)
free(value);
ad = priv;
- if (!ad) {
- LOGE("appdata is null");
- return;
- }
ret = app_control_reply_to_launch_request(reply, ad->request, (app_control_result_e)result);
if (ret != APP_CONTROL_ERROR_NONE)