Skip to contentSkip to conversation

libtraceevent: fix some missing commas in big endian blocks

PATCH In review psykose 2 participants 2 messages Feb 20, 2023

lore
Share & tools
lore

psykose

author
#0 lore raw

PATCH 1/1 libtraceevent: fix some missing commas in big endian blocks

the lack of a trailing comma makes the array definition invalid, since elements must be comma delimited in the initialiser. so, add one in the big endian case too.

---
 utest/traceevent-utest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
utest/traceevent-utest.c +3 -3
index ebd5eb9..041843e 100644
@@ -45,7 +45,7 @@ static char dyn_str_data[] = {
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 	/* common type */		1, 0x00,
 #else
-	/* common type */		0x00, 1
+	/* common type */		0x00, 1,
 #endif
 	/* common flags */		0x00,
 	/* common_preempt_count */	0x00,
@@ -82,7 +82,7 @@ static char dyn_str_old_data[] = {
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 	/* common type */		2, 0x00,
 #else
-	/* common type */		0x00, 2
+	/* common type */		0x00, 2,
 #endif
 	/* common flags */		0x00,
 	/* common_preempt_count */	0x00,
@@ -166,7 +166,7 @@ static char sizeof_data[] = {
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 	/* common type */		23, 0x00,
 #else
-	/* common type */		0x00, 23
+	/* common type */		0x00, 23,
 #endif
 	/* common flags */		0x00,
 	/* common_preempt_count */	0x00,
Signature · 1 line
2.39.2
#1 lore raw
Quoted 3 lines · On Mon, 20 Feb 2023 18:52:41 +0100 psykose <[email protected]> wrote:

the lack of a trailing comma makes the array definition invalid, since elements must be comma delimited in the initialiser. so, add one in the big endian case too.

Thanks. I was also wondering if anyone was doing anything with big endian these days ;-)

-- Steve

Quoted 3 lines

---