Signed-off-by: Michael Adler <[email protected]>
---
tools/bg_setenv.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c
index c5def8d..0429c01 100644
--- a/tools/bg_setenv.c
+++ b/tools/bg_setenv.c
@@ -554,16 +554,15 @@ static void dump_envs(void)
fprintf(stdout, " Config Partition #%d ", i);
}
BGENV *env = bgenv_open_by_index(i);
- if (env) {
- if (verbosity) {
- dump_env(env->data);
- }
- } else {
- fprintf(stderr, "Error, could not read environment "
+ if (!env) {
+ fprintf(stderr, "Error, could not read environment "
"for index %d\n",
i);
return;
}
+ if (verbosity) {
+ dump_env(env->data);
+ }
bgenv_close(env);
}
}
--
2.33.0
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/efibootguard-dev/20211014084444.352944-4-michael.adler%40siemens.com.