From: seungha.son Date: Fri, 9 Sep 2016 04:46:01 +0000 (+0900) Subject: Fix wrong condition statement X-Git-Tag: submit/tizen/20160919.100356^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f91017ce082e6185d270548d2b4acd36e89f41c7;p=platform%2Fcore%2Fapi%2Fnotification.git Fix wrong condition statement Signed-off-by: seungha.son Change-Id: I899db908eac4f51ca67a1e598af188a24a854b21 --- diff --git a/src/notification_internal.c b/src/notification_internal.c index e3b27199..39a37d7f 100755 --- a/src/notification_internal.c +++ b/src/notification_internal.c @@ -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;