From: Stephen Hemminger Date: Sat, 14 Feb 2015 14:59:07 +0000 (-0500) Subject: eal/bsd: remove useless assignments X-Git-Tag: spdx-start~9497 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=944127d1ed5b5d7a8c917817c74b37680c84f127;p=dpdk.git eal/bsd: remove useless assignments If variable is set in the next line, it doesn't need to be initialized. Signed-off-by: Stephen Hemminger --- diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 44f9d421fb..0e67471ecb 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -422,7 +422,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 9193f8004a..e692b35ba9 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -379,7 +379,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 = {