eal/bsd: remove useless assignments
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 14 Feb 2015 14:59:07 +0000 (09:59 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 4 Mar 2015 20:50:42 +0000 (21:50 +0100)
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
lib/librte_eal/bsdapp/eal/eal_pci.c

index 44f9d42..0e67471 100644 (file)
@@ -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;
index 9193f80..e692b35 100644 (file)
@@ -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 = {