From 2d7437b1b175fca681cf39434ebcac4cc7d3ee0c Mon Sep 17 00:00:00 2001 From: dyamy-lee Date: Tue, 22 Dec 2020 15:03:18 +0900 Subject: [PATCH] because usleep function is vulnerable for use, remove it. Change-Id: I7031eddd672882758fe68677d01baa355926acb4 --- base/base_main.c | 3 --- fota_gui_wearable/fota_gui_ro_wearable_main.c | 3 --- rw-update-ani-wearable/rw-update-ani_new.c | 4 ---- 3 files changed, 10 deletions(-) diff --git a/base/base_main.c b/base/base_main.c index b66b1b9..0ac1d94 100644 --- a/base/base_main.c +++ b/base/base_main.c @@ -38,8 +38,6 @@ static int s_prog_percent = 0; static int wait_main(void) { - int delay = 20000; - if (setpriority(PRIO_PROCESS, getpid(), -11) < 0) LOG("failed to setpriority\n"); @@ -50,7 +48,6 @@ static int wait_main(void) } while (1) { - usleep(delay); s_prog_percent = fota_gr_update_progress(); if (s_prog_percent == -1) break; sleep(1); diff --git a/fota_gui_wearable/fota_gui_ro_wearable_main.c b/fota_gui_wearable/fota_gui_ro_wearable_main.c index 1b8f40c..06a6240 100644 --- a/fota_gui_wearable/fota_gui_ro_wearable_main.c +++ b/fota_gui_wearable/fota_gui_ro_wearable_main.c @@ -38,8 +38,6 @@ static int s_prog_percent = 0; static int wait_main_fota_ro(void) { - int delay = 20000; - if (setpriority(PRIO_PROCESS, getpid(), -11) < 0) LOG("failed to setpriority\n"); @@ -50,7 +48,6 @@ static int wait_main_fota_ro(void) } while (1) { - usleep(delay); s_prog_percent = fota_gr_update_progress(); if (s_prog_percent == -1) break; sleep(1); diff --git a/rw-update-ani-wearable/rw-update-ani_new.c b/rw-update-ani-wearable/rw-update-ani_new.c index b955742..ead2884 100644 --- a/rw-update-ani-wearable/rw-update-ani_new.c +++ b/rw-update-ani-wearable/rw-update-ani_new.c @@ -293,11 +293,7 @@ int rw_update_process(void) { _FUNC_ENTER; - int delay = 50000; - //int progress = 0; - while (1) { - usleep(delay); fb_draw_screen(&fbi); sleep(1); } -- 2.34.1