Fix Coding rule non-compliance 46/149546/1 accepted/tizen/4.0/unified/20170913.002703 submit/tizen_4.0/20170912.114833 tizen_4.0.IoT.p1_release tizen_4.0.m2_release
authorjunkyu han <junkyu.han@samsung.com>
Tue, 12 Sep 2017 11:45:20 +0000 (20:45 +0900)
committerjunkyu han <junkyu.han@samsung.com>
Tue, 12 Sep 2017 11:45:20 +0000 (20:45 +0900)
Change-Id: I3cd100b1f35fc9f4a72ee908ff6d9549dca6b0e8

src/animation.c
src/boot.c
src/boot_sound.c
test/feature_test/group_feature_on_off_animation.c
test/function_test/function_test.c
test/unit/unit_test/unit_test_group_test/unit_test_group.c
test/unit/unit_test/unit_test_main.c

index 6f2e222892026c1081fecef16080833b826f87d3..8de3bbae258769202fda95712120e26bc43488ff 100644 (file)
@@ -92,9 +92,8 @@ static Eina_Bool __end_cb(void *data)
                __block_display();
        } else {
                __D("EXIT on BOOTING");
-               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) {
+               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0)
                        __E("Failed to set finished set");
-               }
                boot_exit();
        }
        return ECORE_CALLBACK_CANCEL;
@@ -104,9 +103,8 @@ static void __animation_finished_cb(void *d, Evas_Object * obj, const char *e, c
 {
        if (s_animation.state == TYPE_OFF) {
                __D("TYPE OFF");
-               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) {
+               if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0)
                        __E("Failed to set finished set");
-               }
                ecore_timer_add(1, __end_cb, (void *)TYPE_OFF);
        } else {
                __D("TYPE_ON");
@@ -162,22 +160,21 @@ char *get_layout_file_name(int state, int w, int h)
        char file_name[1024];
        int ret = 0;
 
-       if (state == TYPE_OFF) {
+       if (state == TYPE_OFF)
                snprintf(file_name, sizeof(file_name), FILE_PATH"%dx%d_PowerOff.edj", w, h);
-       } else {
+       else
                snprintf(file_name, sizeof(file_name), FILE_PATH"%dx%d_PowerOn.edj", w, h);
-       }
+
        __D("File name for Animation is: %s", file_name);
 
        ret = access(file_name, 0);
        if (ret == 0) {
        } else {
                __E("There's no Image same with [%s], So set Default[720x1280] image", file_name);
-               if (state == TYPE_OFF) {
+               if (state == TYPE_OFF)
                        snprintf(file_name, sizeof(file_name), "%s", DEFAULT_OFF);
-               } else {
+               else
                        snprintf(file_name, sizeof(file_name), "%s", DEFAULT_ON);
-               }
 
                ret = access(file_name, 0);
                if (ret) {
@@ -194,11 +191,10 @@ Eina_Bool is_layout_file_exist(const char *file_name)
        int ret = 0;
 
        ret = access(file_name, 0);
-       if (ret == 0) {
+       if (ret == 0)
                return EINA_TRUE;
-       } else {
+       else
                return EINA_FALSE;
-       }
 }
 
 Evas_Object *create_layout(Evas_Object *win, const char *file_name)
index afb8b8ddc50724c04e3061628ef60d83c65e6f8f..f52f393c650ba32ad04c78ab604e2e25b0d232f7 100755 (executable)
@@ -50,9 +50,8 @@ static int __check_on_off_type(void *user_data)
        argc = args->argc;
        argv = args->argv;
 
-       for (i = 0; i < argc; i++) {
+       for (i = 0; i < argc; i++)
                __D("argc %d [%s]", i, argv[i]);
-       }
 
        while ((c = getopt_long(argc, argv, "sopc", long_options, NULL)) >= 0) {
 
@@ -101,9 +100,9 @@ int main(int argc, char *argv[])
        args.argv = argv;
 
        static int invoked_flag = 0;
-       if (invoked_flag == 1) {
+       if (invoked_flag == 1)
                return -1;
-       }
+
        invoked_flag = 1;
 
        close(1);
@@ -125,9 +124,8 @@ int main(int argc, char *argv[])
                return 1;
        }
 
-       if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 0) != 0) {
+       if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 0) != 0)
                __D("Failed to set finished value to 0\n");
-       }
 
        play_boot_sound(boot_type);
 
index db14398a1bb1b61769d2d53d0790c4ea435c3569..dedc13cfdcec69d32c47a42b28e91e77808f9f7f 100755 (executable)
@@ -41,9 +41,8 @@ static int __get_sound_status(void)
 {
        int soundon = 1;
 
-       if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &soundon) < 0) {
+       if (vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &soundon) < 0)
                __D("VCONFKEY_SETAPPL_SOUND_STATUS_BOOL ==> FAIL!!");
-       }
 
        __D("Sound status: %d", soundon);
 
@@ -52,7 +51,7 @@ static int __get_sound_status(void)
 
 void play_boot_sound(int boot_type)
 {
-       if(!is_supported) return ;
+       if (!is_supported) return ;
 
        int soundon = __get_sound_status();
        if (soundon) {
index 8e948c67335852ff47cd21a6aa170aa532ace942..26345b73823d2eb0b38835236031caf8a920bf8e 100755 (executable)
@@ -94,28 +94,25 @@ static void __case_start_off_animation(bool * is_passed)
 
 static int __get_step_max(int w, int h)
 {
-       if (w == 360 && h == 360) {
+       if (w == 360 && h == 360)
                return 3;
-       } else if (w == 360 && h == 480) {
+       else if (w == 360 && h == 480)
                return 3;
        } else if (w == 480 && h == 800) {
-               if (s_info.on_off == TYPE_ON) {
+               if (s_info.on_off == TYPE_ON)
                        return 4;
-               } else {
+               else
                        return 3;
-               }
        } else if (w == 720 && h == 1280) {
-               if (s_info.on_off == TYPE_ON) {
+               if (s_info.on_off == TYPE_ON)
                        return 7;
-               } else {
+               else
                        return 3;
-               }
        } else {
-               if (s_info.on_off == TYPE_ON) {
+               if (s_info.on_off == TYPE_ON)
                        return 7;
-               } else {
+               else
                        return 3;
-               }
        }
 }
 
@@ -149,9 +146,8 @@ static void __case_check_animation(bool * is_passed)
        elm_layout_file_get(layout, &file_name, NULL);
        TEST_ASSERT_EQUAL_STRING(get_layout_file_name(s_info.on_off, screen_w, screen_h), file_name);
 
-       if (s_info.current_step < __get_step_max(screen_w, screen_h)) {
+       if (s_info.current_step < __get_step_max(screen_w, screen_h))
                s_info.current_case -= 1;
-       }
 
        s_info.current_step += 1;
 
index 26fce3545b88a5661157b1ae1be31a157fc2f48e..083d7118c125b224a2e3cc2ece77881a2fe5f9e4 100755 (executable)
@@ -31,9 +31,8 @@ static void __complete_group_cb(void)
 
 static void __run_next_group(void)
 {
-       if (s_info.group_starter_pool[s_info.current_group]) {
+       if (s_info.group_starter_pool[s_info.current_group])
                TEST_GROUP(s_info.group_name[s_info.current_group], s_info.group_starter_pool[s_info.current_group], __complete_group_cb);
-       }
 }
 
 void function_test(void)
index 186a7d5af442aef7dcfb0d1a1c8ea09e1ffd1bce..aefcadd805d96c77723ae479b4f1aeba9e43629e 100755 (executable)
@@ -40,9 +40,8 @@ void unit_test_group(void)
 
 static void __run_next_group(void)
 {
-       if (s_info.current_group >= 2) {
+       if (s_info.current_group >= 2)
                return ;
-       }
 
        unit_init();
        TEST_GROUP(s_info.group_name[s_info.current_group], s_info.group_starter_pool[s_info.current_group], __complete_group_cb);
@@ -50,11 +49,10 @@ static void __run_next_group(void)
 
 static void __complete_group_cb(void)
 {
-       if (s_info.current_group == 0) {
+       if (s_info.current_group == 0)
                __unit_test_run_group(0, 1, __unit_test_pass_group);
-       } else if (s_info.current_group == 1) {
+       else if (s_info.current_group == 1)
                __unit_test_run_group(0, 1, __unit_test_fail_group);
-       }
 
        s_info.current_group += 1;
 
index fb51f030e0bdba765731db49e9521d60d71b371c..987a322570f50d9fe6d65557279754d91b549005 100755 (executable)
@@ -46,9 +46,8 @@ int main(int argc, char *argv[])
        lifecycle_callback.terminate = __terminate;
 
        int ret = ui_app_main(argc, argv, &lifecycle_callback, NULL);
-       if (ret != APP_ERROR_NONE) {
+       if (ret != APP_ERROR_NONE)
                __T("app_main() is failed. err = %d", ret);
-       }
 
        return 0;
 }