Add return statement 09/228809/2 submit/tizen/20200326.013738
authorHyunjee Kim <hj0426.kim@samsung.com>
Thu, 26 Mar 2020 01:16:45 +0000 (10:16 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Thu, 26 Mar 2020 01:19:21 +0000 (10:19 +0900)
Change-Id: I1c6870d7e31762d380742e83e8f43bd80d62145b
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
src/utils_i18n_utext.c

index 85169da..4abc74f 100644 (file)
@@ -170,12 +170,15 @@ int64_t i18n_utext_get_native_index(const i18n_utext_h ut)
 
 void i18n_utext_set_native_index(i18n_utext_h ut, int64_t native_index)
 {
-       if(ut == NULL || native_index == NULL)
+       if(ut == NULL || native_index == NULL) {
                set_last_result(I18N_ERROR_INVALID_PARAMETER);
+               return;
+       }
 
        set_last_result(I18N_ERROR_NONE);
+       utext_setNativeIndex((UText *)ut, native_index);
 
-       return utext_setNativeIndex((UText *)ut, native_index);
+       return;
 }
 
 i18n_ubool i18n_utext_move_index32(i18n_utext_h ut, int32_t delta)
@@ -264,10 +267,14 @@ int i18n_utext_copy(i18n_utext_h ut, int64_t native_start, int64_t native_limit,
 
 void i18n_utext_freeze(i18n_utext_h ut)
 {
-       if(ut == NULL)
+       if(ut == NULL) {
                set_last_result(I18N_ERROR_INVALID_PARAMETER);
+               return;
+       }
 
        set_last_result(I18N_ERROR_NONE);
 
        utext_freeze((UText *)ut);
+
+       return;
 }