Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 2/3] spp_primary: remove declaration in for loop
Date: Thu,  4 Apr 2019 18:57:39 +0900	[thread overview]
Message-ID: <1554371860-18206-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1554371860-18206-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

For some environment, declaration in for loop cause an error. This
update is to move it from.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 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


  parent reply	other threads:[~2019-04-04  9:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04  9:57 [spp] [PATCH 0/3] Update for compile on CentOS7 ogawa.yasufumi
2019-04-04  9:57 ` [spp] [PATCH 1/3] spp_nfv: remove declaration in for loop ogawa.yasufumi
2019-04-04  9:57 ` ogawa.yasufumi [this message]
2019-04-04  9:57 ` [spp] [PATCH 3/3] spp_vf: change inline func calls static inside ogawa.yasufumi

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=1554371860-18206-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /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).