From: Mathieu Desnoyers Date: Mon, 25 Jul 2011 21:14:02 +0000 (-0400) Subject: byte order from arch only needs to be set when not using packet metadata X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=da75b0f7af646e4bd6a7cf3747c6a1402fc1967d;p=deliverable%2Fbabeltrace.git byte order from arch only needs to be set when not using packet metadata Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 404305582..d685b6cd7 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -607,11 +607,12 @@ int ctf_open_trace_metadata_read(struct ctf_trace *td) goto end_stream; } - td->byte_order = BYTE_ORDER; if (packet_metadata(td, fp)) { ret = ctf_open_trace_metadata_stream_read(td, &fp, &buf); if (ret) goto end_packet_read; + } else { + td->byte_order = BYTE_ORDER; } scanner = ctf_scanner_alloc(fp);