diff options
author | Dongwoo Lee <dwoo08.lee@samsung.com> | 2022-09-20 12:38:37 +0900 |
---|---|---|
committer | Dongwoo Lee <dwoo08.lee@samsung.com> | 2022-09-20 12:40:26 +0900 |
commit | d30bc71df8c92b42e24d5f237f607345425ebf2d (patch) | |
tree | 7cef98fca6980c758912a6f28dd3486dba6796d3 | |
parent | 1951ce3185e97f86c1b011ce1b02cfe50341444a (diff) | |
download | device-rpi-d30bc71df8c92b42e24d5f237f607345425ebf2d.tar.gz device-rpi-d30bc71df8c92b42e24d5f237f607345425ebf2d.tar.bz2 device-rpi-d30bc71df8c92b42e24d5f237f607345425ebf2d.zip |
Use strtok_r instead of strtok for thread safetytizen_7.0_m2_releaseaccepted/tizen/unified/20220922.114010accepted/tizen/7.0/unified/hotfix/20221116.110413accepted/tizen/7.0/unified/20221110.063505tizen_7.0_hotfixaccepted/tizen_7.0_unified_hotfix
Change-Id: I07104009925a0501872ba1ade389704fda1cc305
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r-- | hw/board/board.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/board/board.c b/hw/board/board.c index 10ccf02..743a823 100644 --- a/hw/board/board.c +++ b/hw/board/board.c @@ -197,6 +197,7 @@ static int set_partition_status(char partition_ab, const char *status) static int get_partition_status(char partition_ab, char *buffer, const int max_len) { + char *dummy; char *path; char target_partition_ab = partition_ab; @@ -226,7 +227,7 @@ static int get_partition_status(char partition_ab, char *buffer, const int max_l } /* remove potential newline | tokenizer will place '\0' in a place of '\n' */ - strtok(buffer, "\n"); + strtok_r(buffer, "\n", &dummy); if (strcmp(buffer, PARTITION_STATUS_OK) != 0 && strcmp(buffer, PARTITION_STATUS_CORRUPTED) != 0 && |