[PATCH 1/6] tools/lib/traceevent: Initialize host_bigendian at tep_handle allocation
From: Steven Rostedt
Date: Fri Nov 30 2018 - 23:09:25 EST
From: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>
This patch initializes host_bigendian member of the tep_handle structure
with the byte order of current host, when this handler is created - in
tep_alloc() API. We need this in order to remove tep_set_host_bigendian() API.
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
tools/lib/traceevent/event-parse.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 0923e331441e..5cd99bdb0517 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -6761,8 +6761,10 @@ struct tep_handle *tep_alloc(void)
{
struct tep_handle *pevent = calloc(1, sizeof(*pevent));
- if (pevent)
+ if (pevent) {
pevent->ref_count = 1;
+ pevent->host_bigendian = tep_host_bigendian();
+ }
return pevent;
}
--
2.19.1