src.ctf.fs: make ctf_fs_ds_index_create return a unique_ptr
[babeltrace.git] / src / plugins / ctf / fs-src / fs.cpp
index 7ad16003d0430378e820f412d947cdeb35b47095..2c8a440ce6bf4277ac47bb9d33c12b118e4bb9d9 100644 (file)
@@ -604,7 +604,7 @@ static int add_ds_file_to_ds_file_group(struct ctf_fs_trace *ctf_fs_trace, const
         goto error;
     }
 
-    index = ctf_fs_ds_file_build_index(ds_file, ds_file_info.get(), msg_iter);
+    index = ctf_fs_ds_file_build_index(ds_file, ds_file_info.get(), msg_iter).release();
     if (!index) {
         BT_CPPLOGE_APPEND_CAUSE_SPEC(ctf_fs_trace->logger, "Failed to index CTF stream file \'{}\'",
                                      ds_file->file->path->str);
@@ -1059,13 +1059,12 @@ static int merge_matching_ctf_fs_ds_file_groups(struct ctf_fs_trace *dest_trace,
          */
         if (!dest_group) {
             struct ctf_stream_class *sc;
-            struct ctf_fs_ds_index *index;
 
             sc = ctf_trace_class_borrow_stream_class_by_id(dest_trace->metadata->tc,
                                                            src_group->sc->id);
             BT_ASSERT(sc);
 
-            index = ctf_fs_ds_index_create(dest_trace->logger);
+            auto index = ctf_fs_ds_index_create(dest_trace->logger).release();
             if (!index) {
                 ret = -1;
                 goto end;
This page took 0.022372 seconds and 4 git commands to generate.