From 29eb075c01bcf87f398fe32bc6f67139b94d38bf Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 18 Dec 2022 22:40:04 +0200 Subject: [PATCH 32/32] rulesave: Fix clang analyzer warning about strcmp(NULL, ...) See osdn #46292 Signed-off-by: Marko Lindqvist --- tools/ruleutil/rulesave.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/ruleutil/rulesave.c b/tools/ruleutil/rulesave.c index 777fc256dc..75168595de 100644 --- a/tools/ruleutil/rulesave.c +++ b/tools/ruleutil/rulesave.c @@ -809,6 +809,10 @@ static bool save_action_ui_name(struct section_file *sfile, { const char *ui_name = action_by_number(act)->ui_name; + if (ui_name == NULL) { + return FALSE; + } + if (strcmp(ui_name, action_ui_name_default(act))) { secfile_insert_str(sfile, ui_name, "actions.%s", entry_name); -- 2.35.1