[v2,09/14] l3fwd: fix whitespace

Message ID 20221109195331.143473-10-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series whitespace after keywords |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Nov. 9, 2022, 7:53 p.m. UTC
  Add space after keywords.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/l3fwd-power/main.c | 7 ++++---
 examples/l3fwd/main.c       | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
  

Patch

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd3ade330f82..7bd5d8cb2281 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1787,11 +1787,12 @@  parse_config(const char *q_arg)
 
 	while ((p = strchr(p0,'(')) != NULL) {
 		++p;
-		if((p0 = strchr(p,')')) == NULL)
+		p0 = strchr(p, ')');
+		if (p0 == NULL)
 			return -1;
 
 		size = p0 - p;
-		if(size >= sizeof(s))
+		if (size >= sizeof(s))
 			return -1;
 
 		snprintf(s, sizeof(s), "%.*s", size, p);
@@ -2946,7 +2947,7 @@  main(int argc, char **argv)
 		fflush(stdout);
 
 		/* init RX queues */
-		for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
+		for (queue = 0; queue < qconf->n_rx_queue; ++queue) {
 			struct rte_eth_rxconf rxq_conf;
 
 			portid = qconf->rx_queue_list[queue].port_id;
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 5198ff30dd00..2b8575137d50 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -516,11 +516,12 @@  parse_config(const char *q_arg)
 
 	while ((p = strchr(p0,'(')) != NULL) {
 		++p;
-		if((p0 = strchr(p,')')) == NULL)
+		p0 = strchr(p, ')');
+		if (p0 == NULL)
 			return -1;
 
 		size = p0 - p;
-		if(size >= sizeof(s))
+		if (size >= sizeof(s))
 			return -1;
 
 		snprintf(s, sizeof(s), "%.*s", size, p);
@@ -1366,7 +1367,7 @@  l3fwd_poll_resource_setup(void)
 		printf("\nInitializing rx queues on lcore %u ... ", lcore_id );
 		fflush(stdout);
 		/* init RX queues */
-		for(queue = 0; queue < qconf->n_rx_queue; ++queue) {
+		for (queue = 0; queue < qconf->n_rx_queue; ++queue) {
 			struct rte_eth_rxconf rxq_conf;
 
 			portid = qconf->rx_queue_list[queue].port_id;