[RFC 7/7] app/testpmd: replace comma operator with bracket

Stephen Hemminger stephen at networkplumber.org
Thu Mar 13 00:27:04 CET 2025


Use while with brackets in favor of comma operator.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 app/test-pmd/cmdline_flow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index ad646444f0..26807b0465 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -8333,8 +8333,10 @@ parse_prefix(struct context *ctx, const struct token *token,
 		if (!ctx->object)
 			return len;
 		extra -= u;
-		while (u--)
-			(v <<= 1, v |= 1);
+		while (u--) {
+			v <<= 1;
+			v |= 1;
+		}
 		v <<= extra;
 		if (!arg_entry_bf_fill(ctx->object, v, arg) ||
 		    !arg_entry_bf_fill(ctx->objmask, -1, arg))
-- 
2.47.2



More information about the dev mailing list