aboutsummaryrefslogtreecommitdiff
path: root/src/rtos/mqx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtos/mqx.c')
-rw-r--r--src/rtos/mqx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rtos/mqx.c b/src/rtos/mqx.c
index b4a1821..017fd2b 100644
--- a/src/rtos/mqx.c
+++ b/src/rtos/mqx.c
@@ -319,7 +319,7 @@ static int mqx_update_threads(
i < (uint32_t)rtos->thread_count;
i++
) {
- uint8_t task_name[MQX_THREAD_NAME_LENGTH + 1];
+ char task_name[MQX_THREAD_NAME_LENGTH + 1];
uint32_t task_addr = 0, task_template = 0, task_state = 0;
uint32_t task_name_addr = 0, task_id = 0, task_errno = 0;
uint32_t state_index = 0;
@@ -380,10 +380,9 @@ static int mqx_update_threads(
rtos->thread_details[i].threadid = task_id;
rtos->thread_details[i].exists = true;
/* set thread name */
- rtos->thread_details[i].thread_name_str = malloc(strlen((void *)task_name) + 1);
+ rtos->thread_details[i].thread_name_str = strdup(task_name);
if (!rtos->thread_details[i].thread_name_str)
return ERROR_FAIL;
- strcpy(rtos->thread_details[i].thread_name_str, (void *)task_name);
/* set thread extra info
* - task state
* - task address