From: Yunhee Seo Date: Tue, 19 Sep 2023 06:16:18 +0000 (+0900) Subject: feedback: Remove unnecessary branch X-Git-Tag: accepted/tizen/7.0/unified/20230922.162630^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89891b43659da37522a73a086dedc103ef4e32ce;p=platform%2Fcore%2Fsystem%2Flibsvi.git feedback: Remove unnecessary branch As support all_str_pattern for common/da profile, unnecessary branch is removed to keep code quality. Change-Id: Ib36af481b1e678afa44bcf9b5316a4f3e22fac59 Signed-off-by: Yunhee Seo --- diff --git a/src/check.c b/src/check.c index 66dd329..dc9520c 100644 --- a/src/check.c +++ b/src/check.c @@ -936,8 +936,6 @@ static int profile_get_num_of_pattern() //LCOV_EXCL_START else if (prof == PROFILE_WEARABLE) return ARR_SIZE(wearable_str_pattern); - else if (prof == PROFILE_DA) - return ARR_SIZE(all_str_pattern); else return ARR_SIZE(all_str_pattern); //LCOV_EXCL_STOP @@ -990,11 +988,6 @@ static const char *profile_str_pattern(int pattern) if (pattern == wearable_str_standard[i].id) return wearable_str_standard[i].string; } - } else if (prof == PROFILE_DA) { - for (i = 0; i < profile_get_num_of_pattern(); i++) { - if (pattern == all_str_pattern[i].id) - return all_str_pattern[i].string; - } } else { for (i = 0; i < profile_get_num_of_pattern(); i++) { if (pattern == all_str_pattern[i].id) @@ -1034,11 +1027,6 @@ static int profile_get_pattern_enum(char *pattern) if (!strncmp(pattern, wearable_str_standard[i].string, len)) return wearable_str_standard[i].id; } - }else if (prof == PROFILE_DA) { - for (i = 0; i < profile_get_num_of_pattern(); i++) { - if (!strncmp(pattern, all_str_pattern[i].string, len)) - return all_str_pattern[i].id; - } } else { for (i = 0; i < profile_get_num_of_pattern(); i++) { if (!strncmp(pattern, all_str_pattern[i].string, len))