Fixed defects detected by static analysis tool 00/141800/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 1 Aug 2017 11:39:19 +0000 (20:39 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 1 Aug 2017 11:40:04 +0000 (20:40 +0900)
Change-Id: I9bc616c9fd71e77c7701ce5d1f35878615c4f114

scl/sclresourcecache.cpp

index 561f341..72c6279 100644 (file)
@@ -1200,7 +1200,7 @@ void CSCLResourceCache::generate_autopopup_layout(const SclLayoutKeyCoordinate *
         sclbyte num_keys, num_columns, num_rows;
         sclint x, y, width, height;
         SCLShiftState shift_index = context->get_shift_state();
-        if (shift_index < 0 || shift_index >= SCL_SHIFT_STATE_MAX) shift_index = SCL_SHIFT_STATE_OFF;
+        if (shift_index >= SCL_SHIFT_STATE_MAX) shift_index = SCL_SHIFT_STATE_OFF;
         if (context->get_caps_lock_mode()) {
             shift_index = (shift_index == SCL_SHIFT_STATE_OFF) ? SCL_SHIFT_STATE_ON : SCL_SHIFT_STATE_OFF;
         }