tree-wide: drop de-constifying casts for strv iteration
When the the iterator variable is declared automatically, it "inherits" the const/non-const status from the argument. We don't need to cast a const table to non-const. If we had a programming error and tried to modify the string, the compiler could now catch this.
This commit is contained in:
@@ -960,7 +960,7 @@ int boot_config_augment_from_loader(
|
||||
if (!c)
|
||||
return log_oom();
|
||||
|
||||
STRV_FOREACH_PAIR(a, b, (char**) title_table)
|
||||
STRV_FOREACH_PAIR(a, b, title_table)
|
||||
if (streq(*a, *i)) {
|
||||
t = strdup(*b);
|
||||
if (!t)
|
||||
|
||||
Reference in New Issue
Block a user