[1/2] eal: provide type instead of expression to per lcore macro

Message ID 1703006864-27378-2-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series remove __typeof__ from expansion of per lcore macros |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Dec. 19, 2023, 5:27 p.m. UTC
  Adjust the use of per lcore macro to provide type as the first argument
as to not require __typeof__ during expansion.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/common/eal_common_errno.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/eal/common/eal_common_errno.c b/lib/eal/common/eal_common_errno.c
index b30e2f0..fff8c1f 100644
--- a/lib/eal/common/eal_common_errno.c
+++ b/lib/eal/common/eal_common_errno.c
@@ -28,7 +28,7 @@ 
 	static const char *sep = "";
 #endif
 #define RETVAL_SZ 256
-	static RTE_DEFINE_PER_LCORE(char[RETVAL_SZ], retval);
+	static RTE_DEFINE_PER_LCORE(char, retval[RETVAL_SZ]);
 	char *ret = RTE_PER_LCORE(retval);
 
 	/* since some implementations of strerror_r throw an error