From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <shemming@brocade.com>
Subject: [dpdk-dev] [PATCH 3/6] bsd: remove useless assignments
Date: Sat, 14 Feb 2015 09:59:07 -0500 [thread overview]
Message-ID: <1423925950-5201-3-git-send-email-shemming@brocade.com> (raw)
In-Reply-To: <1423925950-5201-1-git-send-email-shemming@brocade.com>
If variable is set in the next line, it doesn't need to be
initialized.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/bsdapp/eal/eal.c | 3 ++-
lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index 69f3c03..71ae33c 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -417,7 +417,8 @@ int rte_eal_has_hugepages(void)
int
rte_eal_iopl_init(void)
{
- int fd = -1;
+ int fd;
+
fd = open("/dev/io", O_RDWR);
if (fd < 0)
return -1;
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index 74ecce7..d191323 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -382,7 +382,7 @@ skipdev:
static int
pci_scan(void)
{
- int fd = -1;
+ int fd;
unsigned dev_count = 0;
struct pci_conf matches[16];
struct pci_conf_io conf_io = {
--
2.1.4
next prev parent reply other threads:[~2015-02-14 14:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-14 14:59 [dpdk-dev] [PATCH 1/6] test: remove unneeded casts Stephen Hemminger
2015-02-14 14:59 ` [dpdk-dev] [PATCH 2/6] vhost_xen: remove unnecessary cast Stephen Hemminger
2015-02-19 14:53 ` Bruce Richardson
2015-02-14 14:59 ` Stephen Hemminger [this message]
2015-02-16 11:31 ` [dpdk-dev] [PATCH 3/6] bsd: remove useless assignments Bruce Richardson
2015-02-14 14:59 ` [dpdk-dev] [PATCH 4/6] enic: eliminate useless cast Stephen Hemminger
2015-02-19 14:57 ` Bruce Richardson
2015-02-14 14:59 ` [dpdk-dev] [PATCH 5/6] eal: remove useless memset Stephen Hemminger
2015-02-19 14:58 ` Bruce Richardson
2015-02-14 14:59 ` [dpdk-dev] [PATCH 6/6] examples: remove unneeded casts Stephen Hemminger
2015-02-19 15:02 ` Bruce Richardson
2015-02-19 14:53 ` [dpdk-dev] [PATCH 1/6] test: " Bruce Richardson
2015-03-04 20:52 ` 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=1423925950-5201-3-git-send-email-shemming@brocade.com \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=shemming@brocade.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).