Remove useless bt_iter when creating intersection
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 5 Apr 2016 21:24:15 +0000 (17:24 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 22 Apr 2016 22:05:43 +0000 (18:05 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
converter/babeltrace.c
lib/iterator.c

index 58f534c81a9a3c3ba05ce60f7f6675c70835023b..8921d5ab59d660d7913fa7078db4362db503fbe8 100644 (file)
@@ -628,8 +628,6 @@ struct bt_ctf_iter *iter_create_intersect(struct bt_context *ctx,
                struct bt_iter_pos *inter_end_pos)
 {
        uint64_t begin = 0, end = ULLONG_MAX;
-       /* Useless but needed for bt_iter_create_time_pos. */
-       struct bt_iter bt_iter;
        int ret;
 
        ret = ctf_find_packets_intersection(ctx, &begin, &end);
@@ -640,11 +638,11 @@ struct bt_ctf_iter *iter_create_intersect(struct bt_context *ctx,
        } else if (ret != 0) {
                goto error;
        }
-       inter_begin_pos = bt_iter_create_time_pos(&bt_iter, begin);
+       inter_begin_pos = bt_iter_create_time_pos(NULL, begin);
        if (!inter_begin_pos) {
                goto error;
        }
-       inter_end_pos = bt_iter_create_time_pos(&bt_iter, end);
+       inter_end_pos = bt_iter_create_time_pos(NULL, end);
        if (!inter_end_pos) {
                goto error;
        }
index 540d5e9bcf04b6ba46ca99c2a66db9ec7e31ec74..4ee0d5d22d454394075e3e3e68c2051d1c9202ba 100644 (file)
@@ -615,14 +615,11 @@ error:
        return NULL;
 }
 
-struct bt_iter_pos *bt_iter_create_time_pos(struct bt_iter *iter,
+struct bt_iter_pos *bt_iter_create_time_pos(struct bt_iter *unused,
                uint64_t timestamp)
 {
        struct bt_iter_pos *pos;
 
-       if (!iter)
-               return NULL;
-
        pos = g_new0(struct bt_iter_pos, 1);
        pos->type = BT_SEEK_TIME;
        pos->u.seek_time = timestamp;
This page took 0.034292 seconds and 4 git commands to generate.