From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
David Hunt <david.hunt@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH 5/7] examples: fix whitespace
Date: Mon, 16 Jan 2023 09:27:29 -0800 [thread overview]
Message-ID: <20230116172732.84976-6-stephen@networkplumber.org> (raw)
In-Reply-To: <20230116172732.84976-1-stephen@networkplumber.org>
The style standard is to use blank after keywords.
I.e "if (" not "if("
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/ip_reassembly/main.c | 2 +-
examples/l3fwd-power/main.c | 4 ++--
examples/l3fwd/main.c | 4 ++--
examples/multi_process/symmetric_mp/main.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index bd0b1d31decf..7e84b4944759 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -300,7 +300,7 @@ send_single_packet(struct rte_mbuf *m, uint16_t port)
TX_LCORE_STAT_UPDATE(&qconf->tx_stat, queue, 1);
txmb->m_table[txmb->head] = m;
- if(++txmb->head == len)
+ if (++txmb->head == len)
txmb->head = 0;
return 0;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index fd3ade330f82..3ef6e5a1ccc6 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1787,11 +1787,11 @@ parse_config(const char *q_arg)
while ((p = strchr(p0,'(')) != NULL) {
++p;
- if((p0 = strchr(p,')')) == NULL)
+ if ((p0 = strchr(p,')')) == NULL)
return -1;
size = p0 - p;
- if(size >= sizeof(s))
+ if (size >= sizeof(s))
return -1;
snprintf(s, sizeof(s), "%.*s", size, p);
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 5198ff30dd00..70054183e1bb 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -516,11 +516,11 @@ parse_config(const char *q_arg)
while ((p = strchr(p0,'(')) != NULL) {
++p;
- if((p0 = strchr(p,')')) == NULL)
+ if ((p0 = strchr(p,')')) == NULL)
return -1;
size = p0 - p;
- if(size >= sizeof(s))
+ if (size >= sizeof(s))
return -1;
snprintf(s, sizeof(s), "%.*s", size, p);
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 1ff85875dfdf..8d1119bd8483 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -156,7 +156,7 @@ smp_parse_args(int argc, char **argv)
/* get the port numbers from the port mask */
RTE_ETH_FOREACH_DEV(i)
- if(port_mask & (1 << i))
+ if (port_mask & (1 << i))
ports[num_ports++] = (uint8_t)i;
ret = optind-1;
@@ -471,7 +471,7 @@ main(int argc, char **argv)
if (num_ports & 1)
rte_exit(EXIT_FAILURE, "Application must use an even number of ports\n");
for(i = 0; i < num_ports; i++){
- if(proc_type == RTE_PROC_PRIMARY)
+ if (proc_type == RTE_PROC_PRIMARY)
if (smp_port_init(ports[i], mp, (uint16_t)num_procs) < 0)
rte_exit(EXIT_FAILURE, "Error initialising ports\n");
}
--
2.39.0
next prev parent reply other threads:[~2023-01-16 17:28 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 17:27 [PATCH 0/7] space after keyword cleanups Stephen Hemminger
2023-01-16 17:27 ` [PATCH 1/7] test: fix whitespace Stephen Hemminger
2023-01-16 17:27 ` [PATCH 2/7] testpmd: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 3/7] net/e1000: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 4/7] i40e: " Stephen Hemminger
2023-01-16 17:27 ` Stephen Hemminger [this message]
2023-01-16 17:27 ` [PATCH 6/7] cmdline: " Stephen Hemminger
2023-01-16 17:27 ` [PATCH 7/7] ip_frag: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 0/7] space after keyword cleanups Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 1/7] test: fix whitespace Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 2/7] testpmd: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 3/7] net/e1000: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 4/7] i40e: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 5/7] examples: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 6/7] cmdline: " Stephen Hemminger
2023-01-16 17:51 ` [PATCH v2 7/7] ip_frag: " Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 0/7] add space after keywords Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 1/7] test: fix whitespace Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 2/7] testpmd: " Stephen Hemminger
2023-01-31 8:21 ` Singh, Aman Deep
2023-01-17 0:14 ` [PATCH v3 3/7] net/e1000: " Stephen Hemminger
2023-01-17 1:21 ` Wu, Wenjun1
2023-01-17 1:26 ` Su, Simei
2023-01-17 0:14 ` [PATCH v3 4/7] i40e: " Stephen Hemminger
2023-01-17 0:26 ` Xing, Beilei
2023-01-17 0:14 ` [PATCH v3 5/7] examples: " Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 6/7] cmdline: " Stephen Hemminger
2023-01-17 0:14 ` [PATCH v3 7/7] ip_frag: " Stephen Hemminger
2023-01-22 16:00 ` Konstantin Ananyev
2023-03-12 11:28 ` [PATCH v3 0/7] add space after keywords Thomas Monjalon
2023-03-14 18:06 ` Stephen Hemminger
2023-03-14 18:17 ` Thomas Monjalon
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=20230116172732.84976-6-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
/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).