[v3,16/16] ip_frag: stop using variadic argument pack extension
Checks
Commit Message
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 <roretzla@linux.microsoft.com>
---
lib/ip_frag/ip_frag_common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> Subject: [PATCH v3 16/16] ip_frag: stop using variadic argument pack extension
>
> 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 <roretzla@linux.microsoft.com>
> ---
> lib/ip_frag/ip_frag_common.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/ip_frag/ip_frag_common.h b/lib/ip_frag/ip_frag_common.h
> index c766154..f66a963 100644
> --- a/lib/ip_frag/ip_frag_common.h
> +++ b/lib/ip_frag/ip_frag_common.h
> @@ -26,9 +26,9 @@
> RTE_LOG_LINE(level, IPFRAG, "" __VA_ARGS__)
>
> #ifdef RTE_LIBRTE_IP_FRAG_DEBUG
> -#define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, IPFRAG, fmt, ##args)
> +#define IP_FRAG_LOG(lvl, ...) RTE_LOG(lvl, IPFRAG, __VA_ARGS__)
> #else
> -#define IP_FRAG_LOG(lvl, fmt, args...) do {} while(0)
> +#define IP_FRAG_LOG(lvl, fmt, ...) do {} while (0)
> #endif /* IP_FRAG_DEBUG */
>
> #define IPV4_KEYLEN 1
> --
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
> 1.8.3.1
@@ -26,9 +26,9 @@
RTE_LOG_LINE(level, IPFRAG, "" __VA_ARGS__)
#ifdef RTE_LIBRTE_IP_FRAG_DEBUG
-#define IP_FRAG_LOG(lvl, fmt, args...) RTE_LOG(lvl, IPFRAG, fmt, ##args)
+#define IP_FRAG_LOG(lvl, ...) RTE_LOG(lvl, IPFRAG, __VA_ARGS__)
#else
-#define IP_FRAG_LOG(lvl, fmt, args...) do {} while(0)
+#define IP_FRAG_LOG(lvl, fmt, ...) do {} while (0)
#endif /* IP_FRAG_DEBUG */
#define IPV4_KEYLEN 1