diff mbox

[2/3] vxge: use strcpy for strings

Message ID 1291089767-18864-2-git-send-email-jon.mason@exar.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jon Mason Nov. 30, 2010, 4:02 a.m. UTC
Use strncpy instead of memcpy when working on strings

Signed-off-by: Jon Mason <jon.mason@exar.com>
---
 drivers/net/vxge/vxge-main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Dec. 1, 2010, 9:02 p.m. UTC | #1
From: Jon Mason <jon.mason@exar.com>
Date: Mon, 29 Nov 2010 22:02:46 -0600

> Use strncpy instead of memcpy when working on strings
> 
> Signed-off-by: Jon Mason <jon.mason@exar.com>

Applied to net-next-2.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 44129c3..8a84152 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -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);