summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/linux/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c
index ee3eebfbd83..d31b3c94d62 100644
--- a/src/vlib/linux/pci.c
+++ b/src/vlib/linux/pci.c
@@ -466,7 +466,7 @@ vlib_pci_bind_to_uio (vlib_main_t * vm, vlib_pci_addr_t * addr,
clib_memset (&ifr, 0, sizeof ifr);
clib_memset (&drvinfo, 0, sizeof drvinfo);
ifr.ifr_data = (char *) &drvinfo;
- strncpy (ifr.ifr_name, e->d_name, sizeof (ifr.ifr_name) - 1);
+ clib_strncpy (ifr.ifr_name, e->d_name, sizeof (ifr.ifr_name) - 1);
drvinfo.cmd = ETHTOOL_GDRVINFO;
if (ioctl (fd, SIOCETHTOOL, &ifr) < 0)
@@ -482,7 +482,7 @@ vlib_pci_bind_to_uio (vlib_main_t * vm, vlib_pci_addr_t * addr,
continue;
clib_memset (&ifr, 0, sizeof (ifr));
- strncpy (ifr.ifr_name, e->d_name, sizeof (ifr.ifr_name) - 1);
+ clib_strncpy (ifr.ifr_name, e->d_name, sizeof (ifr.ifr_name) - 1);
if (ioctl (fd, SIOCGIFFLAGS, &ifr) < 0)
{