From: Jan Kiszka <[email protected]>

...as remarked by cppcheck.

Signed-off-by: Jan Kiszka <[email protected]>
---
 tools/bg_setenv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c
index 4878226..3afcc9f 100644
--- a/tools/bg_setenv.c
+++ b/tools/bg_setenv.c
@@ -399,12 +399,11 @@ static void dump_env(BG_ENVDATA *env)
 
 static void update_environment(BGENV *env)
 {
-       struct env_action *action;
-
        printf("Processing journal...\n");
 
        while (!STAILQ_EMPTY(&head)) {
-               action = STAILQ_FIRST(&head);
+               struct env_action *action = STAILQ_FIRST(&head);
+
                journal_process_action(env, action);
                STAILQ_REMOVE_HEAD(&head, journal);
                journal_free_action(action);
-- 
2.12.3

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/ff9b04ec-43f4-6ffd-7b73-c77999521406%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to