summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/board/board.c3
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 &&