]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_ethdev/rte_ethdev.c
ethdev: replace snprintf with strlcpy on init
[dpdk.git] / lib / librte_ethdev / rte_ethdev.c
index 95889ed206dbb3e3d4f6f1577e11e9823bfd0f89..3f2253643e55512350239db519ace16b636f810e 100644 (file)
@@ -459,7 +459,7 @@ rte_eth_dev_allocate(const char *name)
        }
 
        eth_dev = eth_dev_get(port_id);
-       snprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name);
+       strlcpy(eth_dev->data->name, name, sizeof(eth_dev->data->name));
        eth_dev->data->port_id = port_id;
        eth_dev->data->mtu = ETHER_MTU;