]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: don't use Yoda conditions
authorMichal Sekletar <msekleta@redhat.com>
Mon, 9 Sep 2024 12:36:35 +0000 (14:36 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 29 Oct 2024 18:08:04 +0000 (18:08 +0000)
src/analyze/analyze-inspect-elf.c

index 12f347de6a994af1254ba75859bc9d8004c57344..0f78729c3accdf2bcd62d51fc9b482ddef95b537 100644 (file)
@@ -56,7 +56,7 @@ static int analyze_elf(char **filenames, sd_json_format_flags_t json_flags) {
                                  * metadata is parsed recursively in core files, so there might be
                                  * multiple modules. */
                                 if (STR_IN_SET(module_name, "elfType", "elfArchitecture")) {
-                                        if (streq(module_name, "elfType") && streq("coredump", sd_json_variant_string(module_json)))
+                                        if (streq(module_name, "elfType") && streq(sd_json_variant_string(module_json), "coredump"))
                                                 coredump = true;
 
                                         r = table_add_many(