From: Jon Mason <jon.mason@exar.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
Sivakumar Subramani <sivakumar.subramani@exar.com>,
Sreenivasa Honnur <sreenivasa.honnur@exar.com>,
Ram Vepa <ram.vepa@exar.com>
Subject: [PATCH 2/3] vxge: use strcpy for strings
Date: Mon, 29 Nov 2010 22:02:46 -0600 [thread overview]
Message-ID: <1291089767-18864-2-git-send-email-jon.mason@exar.com> (raw)
In-Reply-To: <1291089767-18864-1-git-send-email-jon.mason@exar.com>
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(-)
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);
--
1.7.0.4
next prev parent reply other threads:[~2010-11-30 4:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 4:02 [PATCH 1/3] vxge: remove unnecessary printks Jon Mason
2010-11-30 4:02 ` Jon Mason [this message]
2010-12-01 21:02 ` [PATCH 2/3] vxge: use strcpy for strings David Miller
2010-11-30 4:02 ` [PATCH 3/3] vxge: update driver version Jon Mason
2010-12-01 21:02 ` David Miller
2010-12-01 21:02 ` [PATCH 1/3] vxge: remove unnecessary printks David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291089767-18864-2-git-send-email-jon.mason@exar.com \
--to=jon.mason@exar.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ram.vepa@exar.com \
--cc=sivakumar.subramani@exar.com \
--cc=sreenivasa.honnur@exar.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).