[v2,03/17] cfgfile: stop using variadic argument pack extension

Message ID 1708645606-7514-4-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Series stop using variadic argument pack extension |


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Feb. 22, 2024, 11:46 p.m. UTC
  Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions
which allow a prefix and arguments to be inserted into the log line
without the need to use the ## args variadic argument pack extension.

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


diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c
index 6a5e4fd..e7e690f 100644
--- a/lib/cfgfile/rte_cfgfile.c
+++ b/lib/cfgfile/rte_cfgfile.c
@@ -31,8 +31,9 @@  struct rte_cfgfile {
 #define RTE_LOGTYPE_CFGFILE cfgfile_logtype
-#define CFG_LOG(level, fmt, args...)					\
-	RTE_LOG_LINE(level, CFGFILE, "%s(): " fmt, __func__, ## args)
+#define CFG_LOG(level, ...) \
+	RTE_LOG_LINE_PREFIX(level, CFGFILE, "%s(): ", __func__, __VA_ARGS__)
 /* >8 End of setting up dynamic logging */
 /** when we resize a file structure, how many extra entries