X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=d685b6cd70f4b9ef9362747bb7fa8862a430f086;hp=4043055824b5e24fe253a7835ce9cc95fd989ab1;hb=da75b0f7af646e4bd6a7cf3747c6a1402fc1967d;hpb=03b1e5430ff003071767b232e0cc627d7d8147e9 diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 40430558..d685b6cd 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);