From 3e15c1c089051b2beec954189cf93c9db62043e0 Mon Sep 17 00:00:00 2001 From: MyoungJune Park Date: Mon, 28 Nov 2016 13:18:50 +0900 Subject: [PATCH] Remove check ucol_strength_value == UCOL_PRIMARY In case UCOL_PRIMARY = 0, the if-statement get out of its body. it's buggy. Change-Id: Ib2360289973b252f203af9dd3af9f675c71d34e4 Signed-off-by: MyoungJune Park --- collation.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/collation.c b/collation.c index a09925a..799db55 100644 --- a/collation.c +++ b/collation.c @@ -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) { -- 2.34.1