Fix issue detected by static analysis tool 97/114997/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 16 Feb 2017 04:40:07 +0000 (13:40 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 16 Feb 2017 04:40:16 +0000 (13:40 +0900)
The type of _current_cm_key_id is unsigned int, so it is greater than 0 or equal to 0.

Change-Id: I5a78c2a32be2f2de0c4f7d9fad793aa4dad1ee2a
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/ise.cpp

index 15c7fa0..95d5949 100644 (file)
@@ -1091,7 +1091,7 @@ ise_show(int ic)
         }
 
         // Update CM key button
-        if (_current_cm_key_id >= 0 && _current_cm_key_id < CM_KEY_LIST_SIZE) {
+        if (_current_cm_key_id < CM_KEY_LIST_SIZE) {
             if (strcmp(_cm_key_list[_current_cm_key_id], USER_KEYSTRING_EMOTICON) == 0) {
                 if (ise_is_emoticons_disabled())
                     ise_set_cm_private_key(ise_get_cm_key_id(USER_KEYSTRING_OPTION));