aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/odp_queue_basic.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2024-06-05 13:51:39 +0300
committerGitHub <noreply@github.com>2024-06-05 13:51:39 +0300
commit616034b9c9c789923f7ebe7f1c6d014c4ce8a5d2 (patch)
treedd1b579c93404d2d98b78944bbdf8313ec499bee /platform/linux-dpdk/odp_queue_basic.c
parent8063101c4fac56e16c5a2bb9843f2fd9c5acbfd7 (diff)
parent87913e636da621d47a8d3bc91fbe131abc09c294 (diff)
Merge ODP linux-generic v1.45.0.0 into linux-dpdk.
Diffstat (limited to 'platform/linux-dpdk/odp_queue_basic.c')
-rw-r--r--platform/linux-dpdk/odp_queue_basic.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/platform/linux-dpdk/odp_queue_basic.c b/platform/linux-dpdk/odp_queue_basic.c
index 4b9dee891..4ee51ee6b 100644
--- a/platform/linux-dpdk/odp_queue_basic.c
+++ b/platform/linux-dpdk/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>
@@ -32,6 +30,7 @@
#include <odp_queue_basic_internal.h>
#include <odp_queue_if.h>
#include <odp_schedule_if.h>
+#include <odp_string_internal.h>
#include <odp_timer_internal.h>
#include <inttypes.h>
@@ -1000,12 +999,11 @@ 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;