src.ctf.fs: remove uneeded check in create_streams_for_trace
[babeltrace.git] / src / plugins / ctf / fs-src / fs.cpp
index 39abdd6cf78f000eb98b508711480085e67c9044..f2bd9618e1f9e95ad5483f328cec798d87646f82 100644 (file)
@@ -2076,22 +2076,18 @@ static int create_streams_for_trace(struct ctf_fs_trace *ctf_fs_trace)
             goto error;
         }
 
-        if (ds_file_group->sc->ir_sc) {
-            BT_ASSERT(ctf_fs_trace->trace);
-
-            if (ds_file_group->stream_id == UINT64_C(-1)) {
-                /* No stream ID: use 0 */
-                ds_file_group->stream = bt_stream_create_with_id(
-                    ds_file_group->sc->ir_sc, ctf_fs_trace->trace, ctf_fs_trace->next_stream_id);
-                ctf_fs_trace->next_stream_id++;
-            } else {
-                /* Specific stream ID */
-                ds_file_group->stream =
-                    bt_stream_create_with_id(ds_file_group->sc->ir_sc, ctf_fs_trace->trace,
-                                             (uint64_t) ds_file_group->stream_id);
-            }
+        BT_ASSERT(ds_file_group->sc->ir_sc);
+        BT_ASSERT(ctf_fs_trace->trace);
+
+        if (ds_file_group->stream_id == UINT64_C(-1)) {
+            /* No stream ID: use 0 */
+            ds_file_group->stream = bt_stream_create_with_id(
+                ds_file_group->sc->ir_sc, ctf_fs_trace->trace, ctf_fs_trace->next_stream_id);
+            ctf_fs_trace->next_stream_id++;
         } else {
-            ds_file_group->stream = NULL;
+            /* Specific stream ID */
+            ds_file_group->stream = bt_stream_create_with_id(
+                ds_file_group->sc->ir_sc, ctf_fs_trace->trace, (uint64_t) ds_file_group->stream_id);
         }
 
         if (!ds_file_group->stream) {
This page took 0.024506 seconds and 4 git commands to generate.