if (event) {
/* find the event id */
event_id_ptr = g_hash_table_lookup(stream->event_quark_to_id,
- (gconstpointer) (unsigned long) event);
+ (gconstpointer) GUINT_TO_POINTER(event));
/* event not found in this stream class */
if (!event_id_ptr) {
fprintf(stderr, "[error] Event ID not found in stream class\n");
continue;
}
- event_id = (uint64_t)(unsigned long) *event_id_ptr;
+ event_id = GPOINTER_TO_UINT(*event_id_ptr);
/* find or create the bt_callback_chain for this event */
if (event_id >= bt_stream_cb->per_id_callbacks->len) {
if (iter->main_callbacks.callback) {
for (i = 0; i < iter->main_callbacks.callback->len; i++) {
cb = &g_array_index(iter->main_callbacks.callback, struct bt_callback, i);
- if (!cb)
- goto end;
ret = cb->callback(&ctf_data, cb->private_data);
switch (ret) {
case BT_CB_OK_STOP:
for (i = 0; i < bt_chain->callback->len; i++) {
cb = &g_array_index(bt_chain->callback, struct bt_callback, i);
- if (!cb)
- goto end;
ret = cb->callback(&ctf_data, cb->private_data);
switch (ret) {
case BT_CB_OK_STOP: