Fix wrong condition statement 60/87660/1 accepted/tizen/common/20160919.154747 accepted/tizen/ivi/20160920.051921 accepted/tizen/mobile/20160920.051829 accepted/tizen/tv/20160920.051843 accepted/tizen/wearable/20160920.051902 submit/tizen/20160919.100356
authorseungha.son <seungha.son@samsung.com>
Fri, 9 Sep 2016 04:46:01 +0000 (13:46 +0900)
committerseungha.son <seungha.son@samsung.com>
Fri, 9 Sep 2016 04:49:57 +0000 (13:49 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I899db908eac4f51ca67a1e598af188a24a854b21

src/notification_internal.c

index e3b2719..39a37d7 100755 (executable)
@@ -1316,7 +1316,7 @@ EXPORT_API int notification_set_default_button(notification_h noti, notification
        if (noti == NULL)
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
-       if (index < 0 && index > NOTIFICATION_BUTTON_6)
+       if (index < 0 || index > NOTIFICATION_BUTTON_6)
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        noti->default_button_index = index;
@@ -1346,7 +1346,7 @@ EXPORT_API int notification_get_ongoing_value_type(notification_h noti, notifica
 
 EXPORT_API int notification_set_ongoing_value_type(notification_h noti, notification_ongoing_value_type_e type)
 {
-       if (type < NOTIFICATION_ONGOING_VALUE_TYPE_PERCENT && type > NOTIFICATION_ONGOING_VALUE_TYPE_TIME)
+       if (type < NOTIFICATION_ONGOING_VALUE_TYPE_PERCENT || type > NOTIFICATION_ONGOING_VALUE_TYPE_TIME)
                return NOTIFICATION_ERROR_INVALID_PARAMETER;
 
        noti->ongoing_value_type = type;