callbacks: use correct type for element size
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 Jan 2012 20:30:23 +0000 (15:30 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 9 Jan 2012 20:30:23 +0000 (15:30 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
converter/babeltrace-lib.c

index 9b01281f3438c5c328e4650897e5ec53f0865c30..8f0502cdaebdf81536fdeeadfd4576b1372244e3 100644 (file)
@@ -174,7 +174,7 @@ int babeltrace_iter_add_callback(struct babeltrace_iter *iter,
                                        struct bt_stream_callbacks, stream->stream_id);
                        if (!bt_stream_cb->per_id_callbacks) {
                                bt_stream_cb->per_id_callbacks = g_array_new(FALSE, TRUE,
-                                               sizeof(*bt_stream_cb->per_id_callbacks));
+                                               sizeof(struct bt_callback_chain));
                        }
 
                        if (event) {
@@ -196,13 +196,13 @@ int babeltrace_iter_add_callback(struct babeltrace_iter *iter,
                                                struct bt_callback_chain, event_id);
                                if (!bt_chain->callback) {
                                        bt_chain->callback = g_array_new(FALSE, TRUE,
-                                               sizeof(*bt_chain->callback));
+                                               sizeof(struct bt_callback));
                                }
                        } else {
                                /* callback for all events */
                                if (!iter->main_callbacks.callback) {
                                        iter->main_callbacks.callback = g_array_new(FALSE, TRUE,
-                                                       sizeof(*iter->main_callbacks.callback));
+                                                       sizeof(struct bt_callback));
                                }
                                bt_chain = &iter->main_callbacks;
                        }
This page took 0.024436 seconds and 4 git commands to generate.