aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/odp_queue_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-generic/odp_queue_basic.c')
-rw-r--r--platform/linux-generic/odp_queue_basic.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/platform/linux-generic/odp_queue_basic.c b/platform/linux-generic/odp_queue_basic.c
index f9700742c..ec51b65f2 100644
--- a/platform/linux-generic/odp_queue_basic.c
+++ b/platform/linux-generic/odp_queue_basic.c
@@ -1,8 +1,6 @@
-/* Copyright (c) 2013-2018, Linaro Limited
- * Copyright (c) 2021-2023, Nokia
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2013-2018 Linaro Limited
+ * Copyright (c) 2021-2023 Nokia
*/
#include <odp/api/align.h>
@@ -33,6 +31,7 @@
#include <odp_queue_if.h>
#include <odp_schedule_if.h>
#include <odp_timer_internal.h>
+#include <odp_string_internal.h>
#include <inttypes.h>
#include <string.h>
@@ -1049,12 +1048,10 @@ static int queue_init(queue_entry_t *queue, const char *name,
queue_type = param->type;
- if (name == NULL) {
+ if (name == NULL)
queue->name[0] = 0;
- } else {
- strncpy(queue->name, name, ODP_QUEUE_NAME_LEN - 1);
- queue->name[ODP_QUEUE_NAME_LEN - 1] = 0;
- }
+ else
+ _odp_strcpy(queue->name, name, ODP_QUEUE_NAME_LEN);
memcpy(&queue->param, param, sizeof(odp_queue_param_t));
if (queue->param.sched.lock_count > _odp_sched_fn->max_ordered_locks())
return -1;