[09/15] net: use GCC and MSVC common VA ARGS extension

Message ID 1707774557-16012-10-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series use GCC/MSVC compatible __VA_ARGS__ |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 12, 2024, 9:49 p.m. UTC
  Use ... and forward with __VA_ARGS__ instead of args... and args.
Neither mechanism is conformant with the standard but the former works
with both GCC and MSVC.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/net/rte_net_crc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/lib/net/rte_net_crc.c b/lib/net/rte_net_crc.c
index b401ea3..241155e 100644
--- a/lib/net/rte_net_crc.c
+++ b/lib/net/rte_net_crc.c
@@ -73,8 +73,8 @@ 
 RTE_LOG_REGISTER_DEFAULT(libnet_logtype, INFO);
 #define RTE_LOGTYPE_NET libnet_logtype
 
-#define NET_LOG(level, fmt, args...) \
-	RTE_LOG_LINE(level, NET, "%s(): " fmt, __func__, ## args)
+#define NET_LOG(level, fmt, ...) \
+	RTE_LOG_LINE(level, NET, "%s(): " fmt, __func__, ## __VA_ARGS__)
 
 /* Scalar handling */