Remove unnecessary condition statement 44/89144/1
authorseungha.son <seungha.son@samsung.com>
Thu, 22 Sep 2016 11:22:04 +0000 (20:22 +0900)
committerseungha.son <seungha.son@samsung.com>
Thu, 22 Sep 2016 11:23:29 +0000 (20:23 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I70d56979d2cac254e944c623b811c63caf3eec4d

src/notification_service.c

index 0eb8b89..c56abc5 100755 (executable)
@@ -435,15 +435,14 @@ int notification_add_noti(GVariant *parameters, GVariant **reply_body, uid_t uid
                        return ret;
 
                monitoring_list = (GList *)g_hash_table_lookup(_monitoring_hash, GUINT_TO_POINTER(noti_uid));
-               if (ret == NOTIFICATION_ERROR_NONE) {
-                       ret = notification_noti_check_tag(noti);
-                       if (ret == NOTIFICATION_ERROR_NOT_EXIST_ID)
-                               ret = _add_noti(reply_body, noti, monitoring_list);
-                       else if (ret == NOTIFICATION_ERROR_ALREADY_EXIST_ID)
-                               ret = _update_noti(reply_body, noti, monitoring_list);
-               }
-               notification_free(noti);
 
+               ret = notification_noti_check_tag(noti);
+               if (ret == NOTIFICATION_ERROR_NOT_EXIST_ID)
+                       ret = _add_noti(reply_body, noti, monitoring_list);
+               else if (ret == NOTIFICATION_ERROR_ALREADY_EXIST_ID)
+                       ret = _update_noti(reply_body, noti, monitoring_list);
+
+               notification_free(noti);
        } else {
                ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
        }