From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0025943BF6; Mon, 26 Feb 2024 21:20:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 25D9342E80; Mon, 26 Feb 2024 21:19:55 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 178DF42E07 for ; Mon, 26 Feb 2024 21:19:49 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 275B320B74C4; Mon, 26 Feb 2024 12:19:48 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 275B320B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1708978788; bh=6MQpnBBH7z48vEx5t8YSsZ4pvK9yEpwal57ymng/mJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OkH7fhjQC2Ze+UsbeMIbiNojec5HGVWfyR1DBOzQ/sJB6OqzYtQGQCMc83GwAiswU IzAga8cJdD46DUWehYX8XUn4EmEOqEHlgb0h3U9nALKR3O2qlNRIoKGl1AHbXTdpRJ +A3391IO8SAX8yVW/y46psSWrJu7CLu4vy2W8EGU= From: Tyler Retzlaff To: dev@dpdk.org Cc: Anatoly Burakov , Ashish Gupta , Chenbo Xia , Cristian Dumitrescu , David Hunt , Fan Zhang , Hemant Agrawal , Honnappa Nagarahalli , Jasvinder Singh , Jerin Jacob , Konstantin Ananyev , Maxime Coquelin , Reshma Pattan , Sachin Saxena , Sivaprasad Tummala , Srikanth Yalavarthi , Stephen Hemminger , Sunil Kumar Kori , bruce.richardson@intel.com, mb@smartsharesystems.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v3 04/16] cmdline: stop using variadic argument pack extension Date: Mon, 26 Feb 2024 12:19:34 -0800 Message-Id: <1708978786-6740-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> References: <1707774557-16012-1-git-send-email-roretzla@linux.microsoft.com> <1708978786-6740-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Remove use of args... and just use __VA_ARGS__. The macros expanding the argument pack do not require args extension to remove trailing comma. Signed-off-by: Tyler Retzlaff --- lib/cmdline/cmdline_parse.c | 2 +- lib/cmdline/cmdline_parse_num.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cmdline/cmdline_parse.c b/lib/cmdline/cmdline_parse.c index b6d6dac..76a212d 100644 --- a/lib/cmdline/cmdline_parse.c +++ b/lib/cmdline/cmdline_parse.c @@ -16,7 +16,7 @@ #ifdef RTE_LIBRTE_CMDLINE_DEBUG #define debug_printf printf #else -#define debug_printf(args...) do {} while(0) +#define debug_printf(...) do {} while (0) #endif #define CMDLINE_BUFFER_SIZE 64 diff --git a/lib/cmdline/cmdline_parse_num.c b/lib/cmdline/cmdline_parse_num.c index 820af07..e849878 100644 --- a/lib/cmdline/cmdline_parse_num.c +++ b/lib/cmdline/cmdline_parse_num.c @@ -14,9 +14,9 @@ #include "cmdline_parse_num.h" #ifdef RTE_LIBRTE_CMDLINE_DEBUG -#define debug_printf(args...) printf(args) +#define debug_printf(...) printf(__VA_ARGS__) #else -#define debug_printf(args...) do {} while(0) +#define debug_printf(...) do {} while (0) #endif struct cmdline_token_ops cmdline_token_num_ops = { -- 1.8.3.1