feedback: Remove unnecessary branch 69/299069/1 accepted/tizen/7.0/unified/20230922.162630
authorYunhee Seo <yuni.seo@samsung.com>
Tue, 19 Sep 2023 06:16:18 +0000 (15:16 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Tue, 19 Sep 2023 06:16:18 +0000 (15:16 +0900)
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 <yuni.seo@samsung.com>
src/check.c

index 66dd329..dc9520c 100644 (file)
@@ -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))