From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) by dpdk.org (Postfix) with ESMTP id D7A8CB4BD for ; Sat, 14 Feb 2015 15:59:29 +0100 (CET) Received: by mail-ig0-f172.google.com with SMTP id l13so16021265iga.5 for ; Sat, 14 Feb 2015 06:59:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PhbR9hcht1INQZuM8Pvicoyj2TaZ/vLMyOQ7+MsJqIs=; b=Qhxb4iFI8WvPnd5qaZJ/t0f52JF+bJQdr+exzPkaYlZrFvkRVbWGvjKw5gYeX8ulTu efEvh/LxCci+AhlE1USoLmCRVu1UdsRcJWg1TzogLSk2wHBnqGAU/plJUSgtfWweFvCd Nt8NXT8nEW65bOPZnnfAzyYN1eGhNzAOd8etI4yY8Sz8lCwLkk/dzEMFuQhN+DrFp7lU AdyRHZmMZ8w+SXo2hbR9uG7BE9Ad9sfIUVblZGuJKeTZomyPM9t2BcpD7zJX0thwrE8+ to2n++jwlBIYS7mcO0PBlbGLnutNdjR+lx3ypb6Euf6HzmuGx59JuSPJQm78YXZHd9Jq 1kPA== X-Gm-Message-State: ALoCoQmsWp4MRog2Vf/0KhuoVt8lleURC+5k7X8Bl0IWo98OvjrVKqdGj1qI8zYY6JOCE4CZWHyB X-Received: by 10.42.104.68 with SMTP id q4mr20338573ico.35.1423925969404; Sat, 14 Feb 2015 06:59:29 -0800 (PST) Received: from uryu.home.lan ([67.210.173.2]) by mx.google.com with ESMTPSA id a125sm6302383ioa.40.2015.02.14.06.59.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Feb 2015 06:59:28 -0800 (PST) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: dev@dpdk.org Date: Sat, 14 Feb 2015 09:59:07 -0500 Message-Id: <1423925950-5201-3-git-send-email-shemming@brocade.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1423925950-5201-1-git-send-email-shemming@brocade.com> References: <1423925950-5201-1-git-send-email-shemming@brocade.com> Cc: Stephen Hemminger Subject: [dpdk-dev] [PATCH 3/6] bsd: remove useless assignments X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 14:59:30 -0000 If variable is set in the next line, it doesn't need to be initialized. Signed-off-by: Stephen Hemminger --- 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