X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=decoder.c;h=9990e2998e14bdfff730d05170f39e7c078fa277;hb=82738302754039cffb4ee84b2fa9b1450612a5e3;hp=8ad0c5a132e1bac021184bab8c9ee60e28aa5ff6;hpb=21dfd91d99836bdc6c0da939b601dd8a52358f21;p=libsigrokdecode.git diff --git a/decoder.c b/decoder.c index 8ad0c5a..9990e29 100644 --- a/decoder.c +++ b/decoder.c @@ -767,13 +767,12 @@ SRD_API int srd_decoder_load(const char *module_name) return SRD_OK; except_out: - if (fail_txt) { + /* Don't show a message for the "common" directory, it's not a PD. */ + if (strcmp(module_name, "common")) { srd_exception_catch("Failed to load decoder %s: %s", module_name, fail_txt); - fail_txt = NULL; - } else { - srd_exception_catch("Failed to load decoder %s", module_name); } + fail_txt = NULL; err_out: if (fail_txt) srd_err("Failed to load decoder %s: %s", module_name, fail_txt); @@ -849,7 +848,7 @@ SRD_API int srd_decoder_unload(struct srd_decoder *dec) */ for (l = sessions; l; l = l->next) { sess = l->data; - srd_inst_free_all(sess, NULL); + srd_inst_free_all(sess); } /* Remove the PD from the list of loaded decoders. */