strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
This commit is contained in:
@@ -280,7 +280,6 @@ static int boot_entries_find(
|
||||
size_t *n_entries) {
|
||||
|
||||
_cleanup_strv_free_ char **files = NULL;
|
||||
char **f;
|
||||
int r;
|
||||
|
||||
assert(root);
|
||||
@@ -856,8 +855,6 @@ int boot_entries_augment_from_loader(
|
||||
"auto-reboot-to-firmware-setup", "Reboot Into Firmware Interface",
|
||||
};
|
||||
|
||||
char **i;
|
||||
|
||||
assert(config);
|
||||
|
||||
/* Let's add the entries discovered by the boot loader to the end of our list, unless they are
|
||||
@@ -866,7 +863,6 @@ int boot_entries_augment_from_loader(
|
||||
STRV_FOREACH(i, found_by_loader) {
|
||||
BootEntry *existing;
|
||||
_cleanup_free_ char *c = NULL, *t = NULL, *p = NULL;
|
||||
char **a, **b;
|
||||
|
||||
existing = boot_config_find_entry(config, *i);
|
||||
if (existing) {
|
||||
|
||||
Reference in New Issue
Block a user