From 342b15627c3456295a30b09542159c79becc8599 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 21 Nov 2022 21:32:57 +0200 Subject: [PATCH 24/24] Fix dead 'i' assignment in save_action_auto_actions() See osdn #46087 Signed-off-by: Marko Lindqvist --- tools/ruleutil/rulesave.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/ruleutil/rulesave.c b/tools/ruleutil/rulesave.c index eeb10ef9cc..74df11ae92 100644 --- a/tools/ruleutil/rulesave.c +++ b/tools/ruleutil/rulesave.c @@ -576,8 +576,7 @@ static bool save_action_auto_actions(struct section_file *sfile, const struct action_auto_perf *auto_perf = action_auto_perf_by_number(aap); - i = j = 0; - for (i = 0; + for (i = 0, j = 0; i < NUM_ACTIONS && auto_perf->alternatives[i] != ACTION_NONE; i++) { struct action *paction = action_by_number(auto_perf->alternatives[i]); -- 2.35.1