Remove check ucol_strength_value == UCOL_PRIMARY 80/100380/1 accepted/tizen/3.0/common/20161129.103603 accepted/tizen/3.0/ivi/20161129.063858 accepted/tizen/3.0/mobile/20161129.063800 accepted/tizen/3.0/tv/20161129.063820 accepted/tizen/3.0/wearable/20161129.063838 submit/tizen_3.0/20161129.024735
authorMyoungJune Park <mj2004.park@samsung.com>
Mon, 28 Nov 2016 04:18:50 +0000 (13:18 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Mon, 28 Nov 2016 04:22:02 +0000 (13:22 +0900)
In case UCOL_PRIMARY = 0, the if-statement get out of its body.
it's buggy.

Change-Id: Ib2360289973b252f203af9dd3af9f675c71d34e4
Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
collation.c

index a09925a9f241bc4e49515c0c9edc56c7a8c9d6ed..799db55d31b948cdf5536fe781fe04bf3ca9ec10 100644 (file)
@@ -424,14 +424,12 @@ static int __db_util_collation_create(sqlite3* db_handle, char* locale, char* co
        }
 #endif
 
-       if(ucol_strength_value == UCOL_PRIMARY) {
-               icu_symbol.icu_ucol_setStrength(ucol, ucol_strength_value);
-               if (U_FAILURE(status)) {
-                       DB_UTIL_TRACE_ERROR("ucol_setStrength fail : %d \n", status);
-                       return DB_UTIL_ERR_ICU;
-               } else {
-                       DB_UTIL_TRACE_DEBUG("ucol_setStrength success \n");
-               }
+       icu_symbol.icu_ucol_setStrength(ucol, ucol_strength_value);
+       if (U_FAILURE(status)) {
+               DB_UTIL_TRACE_ERROR("ucol_setStrength fail : %d \n", status);
+               return DB_UTIL_ERR_ICU;
+       } else {
+               DB_UTIL_TRACE_DEBUG("ucol_setStrength success \n");
        }
 
        if(utf_type == DB_UTIL_COL_UTF8) {