X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_mbuf%2Frte_mbuf_pool_ops.c;h=5722976fefdd1fca61207f78cc9a602dbae42ed6;hb=b685f931e1ce33d287e3891d4f19ab07f8d2aa79;hp=9aa15411fdaf7cb64edd1e8b199a1d09c9a73945;hpb=a3acc3144a76819479a679c632fa18b1c3cdeea1;p=dpdk.git diff --git a/lib/librte_mbuf/rte_mbuf_pool_ops.c b/lib/librte_mbuf/rte_mbuf_pool_ops.c index 9aa15411fd..5722976fef 100644 --- a/lib/librte_mbuf/rte_mbuf_pool_ops.c +++ b/lib/librte_mbuf/rte_mbuf_pool_ops.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include @@ -22,7 +23,7 @@ rte_mbuf_set_platform_mempool_ops(const char *ops_name) RTE_MEMPOOL_OPS_NAMESIZE, SOCKET_ID_ANY, 0); if (mz == NULL) return -rte_errno; - strncpy(mz->addr, ops_name, strlen(ops_name)); + strcpy(mz->addr, ops_name); return 0; } else if (strcmp(mz->addr, ops_name) == 0) { return 0; @@ -61,7 +62,7 @@ rte_mbuf_set_user_mempool_ops(const char *ops_name) return -rte_errno; } - strncpy(mz->addr, ops_name, strlen(ops_name)); + strcpy(mz->addr, ops_name); return 0; } @@ -73,7 +74,7 @@ rte_mbuf_user_mempool_ops(void) mz = rte_memzone_lookup("mbuf_user_pool_ops"); if (mz == NULL) - return rte_eal_mbuf_default_mempool_ops(); + return rte_eal_mbuf_user_pool_ops(); return mz->addr; }