]> sigrok.org Git - libsigrokdecode.git/commitdiff
srd_decoder_load(): Drop dead code.
authorUwe Hermann <redacted>
Tue, 28 Feb 2017 08:04:55 +0000 (09:04 +0100)
committerUwe Hermann <redacted>
Tue, 28 Feb 2017 14:13:28 +0000 (15:13 +0100)
In 'except_out' the fail_txt variable is always non-NULL.

decoder.c

index f15a7995bdf18d7f9354fb6af6e9d5895a2a1ce3..83b758f84a8f546496904b287fd40a5dfb524d0e 100644 (file)
--- a/decoder.c
+++ b/decoder.c
@@ -767,13 +767,9 @@ SRD_API int srd_decoder_load(const char *module_name)
        return SRD_OK;
 
 except_out:
-       if (fail_txt) {
-               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);
-       }
+       srd_exception_catch("Failed to load decoder %s: %s",
+                           module_name, fail_txt);
+       fail_txt = NULL;
 err_out:
        if (fail_txt)
                srd_err("Failed to load decoder %s: %s", module_name, fail_txt);