From: Jan Kiszka <
jan.k...@siemens.com>
...as remarked by cppcheck.
Signed-off-by: Jan Kiszka <
jan.k...@siemens.com>
---
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