提交 ead5d238 编写于 作者: J Jon Mason 提交者: David S. Miller

vxge: use strcpy for strings

Use strncpy instead of memcpy when working on strings
Signed-off-by: NJon Mason <jon.mason@exar.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1bacdbb3
......@@ -3451,7 +3451,7 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)
vxge_debug_entryexit(vdev->level_trace, "%s: %s:%d", vdev->ndev->name,
__func__, __LINE__);
memcpy(buf, dev->name, IFNAMSIZ);
strncpy(buf, dev->name, IFNAMSIZ);
/* in 2.6 will call stop() if device is up */
unregister_netdev(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册