From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 663B6A069D for ; Thu, 4 Apr 2019 11:59:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 197281B123; Thu, 4 Apr 2019 11:59:57 +0200 (CEST) Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 86672D0B2 for ; Thu, 4 Apr 2019 11:59:54 +0200 (CEST) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x349xqwI015966; Thu, 4 Apr 2019 18:59:52 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id C8452EA8392; Thu, 4 Apr 2019 18:59:52 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id A2743EA813A; Thu, 4 Apr 2019 18:59:52 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Thu, 4 Apr 2019 18:57:39 +0900 Message-Id: <1554371860-18206-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554371860-18206-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1554371860-18206-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 2/3] spp_primary: remove declaration in for loop X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa For some environment, declaration in for loop cause an error. This update is to move it from. Signed-off-by: Yasufumi Ogawa --- src/primary/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/primary/init.c b/src/primary/init.c index 28ad0a7..60e5c47 100644 --- a/src/primary/init.c +++ b/src/primary/init.c @@ -111,6 +111,7 @@ init(int argc, char *argv[]) const struct rte_memzone *mz; uint16_t count, total_ports; char log_msg[1024] = { '\0' }; /* temporary log message */ + int i; /* init EAL, parsing EAL args */ retval = rte_eal_init(argc, argv); @@ -169,7 +170,7 @@ init(int argc, char *argv[]) lcore_id_used[lcore_id] = 1; } sprintf(log_msg, "Used lcores: "); - for (int i = 0; i < RTE_MAX_LCORE; i++) { + for (i = 0; i < RTE_MAX_LCORE; i++) { if (lcore_id_used[i] == 1) sprintf(log_msg + strlen(log_msg), "%d ", i); } -- 2.7.4