ctf: do not add `intersection-range-ns` in `trace-info` query with no intersect.
[babeltrace.git] / plugins / ctf / fs-src / query.c
index c5e2be8ca333def9329cdec299bcafabb69c8803..de43ba78f6b9005c6ef8bfbef29a65bc335fd649 100644 (file)
@@ -438,10 +438,13 @@ int populate_trace_info(const char *trace_path, const char *trace_name,
        if (ret) {
                goto end;
        }
-       ret = add_range(trace_info, &trace_intersection,
-                       "intersection-range-ns");
-       if (ret) {
-               goto end;
+
+       if (trace_intersection.begin_ns < trace_intersection.end_ns) {
+               ret = add_range(trace_info, &trace_intersection,
+                               "intersection-range-ns");
+               if (ret) {
+                       goto end;
+               }
        }
 
        status = bt_value_map_insert(trace_info, "streams", file_groups);
This page took 0.024086 seconds and 4 git commands to generate.