strv: declare iterator of FOREACH_STRING() in the loop
Same idea as 03677889f0.
No functional change intended. The type of the iterator is generally changed to
be 'const char*' instead of 'char*'. Despite the type commonly used, modifying
the string was not allowed.
I adjusted the naming of some short variables for clarity and reduced the scope
of some variable declarations in code that was being touched anyway.
This commit is contained in:
@@ -126,9 +126,6 @@ bool mount_point_is_api(const char *path) {
|
||||
}
|
||||
|
||||
bool mount_point_ignore(const char *path) {
|
||||
|
||||
const char *i;
|
||||
|
||||
/* These are API file systems that might be mounted by other software, we just list them here so that
|
||||
* we know that we should ignore them. */
|
||||
FOREACH_STRING(i,
|
||||
@@ -515,7 +512,6 @@ int mount_setup(bool loaded_policy, bool leave_propagation) {
|
||||
* use the same label for all their files. */
|
||||
if (loaded_policy) {
|
||||
usec_t before_relabel, after_relabel;
|
||||
const char *i;
|
||||
int n_extra;
|
||||
|
||||
before_relabel = now(CLOCK_MONOTONIC);
|
||||
|
||||
Reference in New Issue
Block a user