Add shared copyright to EfficiOS Inc. and Linux Foundation
[babeltrace.git] / formats / ctf / ctf.c
index ce21464e562b0601540f7beacb96c8da3b597c20..2b2e15185275b68699467ea62f07aa8ef35bca1b 100644 (file)
@@ -3,7 +3,9 @@
  *
  * Format registration.
  *
- * Copyright 2010, 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
+ *
+ * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -156,14 +158,17 @@ int ctf_read_event(struct stream_pos *ppos, struct ctf_stream *stream)
                }
 
                /* lookup timestamp */
+               stream->has_timestamp = 0;
                integer_definition = lookup_integer(&stream->stream_event_header->p, "timestamp", FALSE);
                if (integer_definition) {
                        ctf_update_timestamp(stream, integer_definition);
+                       stream->has_timestamp = 1;
                } else {
                        if (variant) {
                                integer_definition = lookup_integer(variant, "timestamp", FALSE);
                                if (integer_definition) {
                                        ctf_update_timestamp(stream, integer_definition);
+                                       stream->has_timestamp = 1;
                                }
                        }
                }
@@ -987,7 +992,7 @@ int create_stream_packet_index(struct ctf_trace *td,
 
                if (packet_index.packet_size > (filestats.st_size - packet_index.offset) * CHAR_BIT) {
                        fprintf(stdout, "[error] Packet size (%zu bits) is larger than remaining file size (%zu bits).\n",
-                               packet_index.content_size, (filestats.st_size - packet_index.offset) * CHAR_BIT);
+                               packet_index.content_size, (size_t) (filestats.st_size - packet_index.offset) * CHAR_BIT);
                        return -EINVAL;
                }
 
This page took 0.02432 seconds and 4 git commands to generate.