X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoder.c;h=260f6367787597bc8f9c5818bf362f574b9b1c81;hp=c195e4bd00710240f75733a34d04a939da694822;hb=740a49d4d94a9fd2933c724ca08aae2d946ba6a3;hpb=7969d8035530d40753c4f880c90a4e90f9679ccc diff --git a/decoder.c b/decoder.c index c195e4b..260f636 100644 --- a/decoder.c +++ b/decoder.c @@ -1068,6 +1068,13 @@ SRD_API int srd_decoder_load_all(void) return SRD_OK; } +static void srd_decoder_unload_cb(void *arg, void *ignored) +{ + (void)ignored; + + srd_decoder_unload((struct srd_decoder *)arg); +} + /** * Unload all loaded protocol decoders. * @@ -1077,7 +1084,7 @@ SRD_API int srd_decoder_load_all(void) */ SRD_API int srd_decoder_unload_all(void) { - g_slist_foreach(pd_list, (GFunc)srd_decoder_unload, NULL); + g_slist_foreach(pd_list, srd_decoder_unload_cb, NULL); g_slist_free(pd_list); pd_list = NULL;