- BT_ASSERT(first_file_info->index);
- BT_ASSERT(first_file_info->index->entries);
- BT_ASSERT(first_file_info->index->entries->len > 0);
-
- first_ds_index_entry = (struct ctf_fs_ds_index_entry *) &g_array_index(
- first_file_info->index->entries, struct ctf_fs_ds_index_entry, 0);
-
- BT_ASSERT(last_file_info->index);
- BT_ASSERT(last_file_info->index->entries);
- BT_ASSERT(last_file_info->index->entries->len > 0);
-
- last_ds_index_entry = (struct ctf_fs_ds_index_entry *) &g_array_index(
- last_file_info->index->entries, struct ctf_fs_ds_index_entry,
- last_file_info->index->entries->len - 1);
+ /* Last entry. */
+ last_ds_index_entry = (struct ctf_fs_ds_index_entry *) g_ptr_array_index(
+ group->index->entries, group->index->entries->len - 1);