summaryrefslogtreecommitdiff
path: root/controller.c
diff options
context:
space:
mode:
Diffstat (limited to 'controller.c')
-rw-r--r--controller.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/controller.c b/controller.c
index 7987ea1..9267ded 100644
--- a/controller.c
+++ b/controller.c
@@ -965,22 +965,21 @@ SRD_API int srd_pd_output_callback_add(int output_type,
}
/** @private */
-SRD_PRIV void *srd_pd_output_callback_find(int output_type)
+SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(int output_type)
{
GSList *l;
- struct srd_pd_callback *pd_cb;
- void *(cb);
+ struct srd_pd_callback *tmp, *pd_cb;
- cb = NULL;
+ pd_cb = NULL;
for (l = callbacks; l; l = l->next) {
- pd_cb = l->data;
- if (pd_cb->output_type == output_type) {
- cb = pd_cb->cb;
+ tmp = l->data;
+ if (tmp->output_type == output_type) {
+ pd_cb = tmp;
break;
}
}
- return cb;
+ return pd_cb;
}
/* This is the backend function to Python sigrokdecode.add() call. */