From: Michal Sekletar Date: Mon, 9 Sep 2024 12:36:35 +0000 (+0200) Subject: analyze: don't use Yoda conditions X-Git-Tag: v257-rc1~99^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ed5c6aa9b8f8eebc4eb336c835dea8286b48f34;p=thirdparty%2Fsystemd.git analyze: don't use Yoda conditions --- diff --git a/src/analyze/analyze-inspect-elf.c b/src/analyze/analyze-inspect-elf.c index 12f347de6a9..0f78729c3ac 100644 --- a/src/analyze/analyze-inspect-elf.c +++ b/src/analyze/analyze-inspect-elf.c @@ -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(