From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/3] test-pmd: use memset not bzero
Date: Tue, 1 Dec 2015 19:24:10 -0800 [thread overview]
Message-ID: <1449026652-7320-2-git-send-email-stephen@networkplumber.org> (raw)
In-Reply-To: <1449026652-7320-1-git-send-email-stephen@networkplumber.org>
The standard for DPDK is to use memset() not bzero which
is a leftover BSD-ism.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/testpmd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 093952f..98ae46d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1512,7 +1512,7 @@ attach_port(char *identifier)
nb_ports = rte_eth_dev_count();
/* set_default_fwd_ports_config(); */
- bzero(fwd_ports_ids, sizeof(fwd_ports_ids));
+ memset(fwd_ports_ids, 0, sizeof(fwd_ports_ids));
i = 0;
FOREACH_PORT(j, ports) {
fwd_ports_ids[i] = j;
@@ -1547,7 +1547,7 @@ detach_port(uint8_t port_id)
nb_ports = rte_eth_dev_count();
/* set_default_fwd_ports_config(); */
- bzero(fwd_ports_ids, sizeof(fwd_ports_ids));
+ memset(fwd_ports_ids, 0, sizeof(fwd_ports_ids));
i = 0;
FOREACH_PORT(pi, ports) {
fwd_ports_ids[i] = pi;
--
2.1.4
next prev parent reply other threads:[~2015-12-02 3:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-02 3:24 [dpdk-dev] [PATCH 0/3] replace bzero with memset Stephen Hemminger
2015-12-02 3:24 ` Stephen Hemminger [this message]
2015-12-02 3:24 ` [dpdk-dev] [PATCH 2/3] xen-virt: use memset not bzero Stephen Hemminger
2015-12-02 3:24 ` [dpdk-dev] [PATCH 3/3] qat: use memset instead of bzero Stephen Hemminger
2015-12-02 8:28 ` [dpdk-dev] [PATCH 0/3] replace bzero with memset De Lara Guarch, Pablo
2015-12-06 22:51 ` Thomas Monjalon
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=1449026652-7320-2-git-send-email-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/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).