mcslock: add MCS queued lock implementation
[dpdk.git] / lib / librte_eal / common / eal_common_memzone.c
index 664df5b..ef6c909 100644 (file)
@@ -24,6 +24,7 @@
 #include "malloc_heap.h"
 #include "malloc_elem.h"
 #include "eal_private.h"
+#include "eal_memcfg.h"
 
 static inline const struct rte_memzone *
 memzone_lookup_thread_unsafe(const char *name)
@@ -171,7 +172,7 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
                return NULL;
        }
 
-       snprintf(mz->name, sizeof(mz->name), "%s", name);
+       strlcpy(mz->name, name, sizeof(mz->name));
        mz->iova = rte_malloc_virt2iova(mz_addr);
        mz->addr = mz_addr;
        mz->len = requested_len == 0 ?