]> git.ipfire.org Git - thirdparty/systemd.git/commit
strv: declare iterator of FOREACH_STRING() in the loop
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Mar 2022 09:48:13 +0000 (10:48 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 23 Mar 2022 10:50:18 +0000 (11:50 +0100)
commit5980d463048f25411c55da2f6387cdc8eaeef4c8
treee5c32417015bfd67d326d278b1cd7dac3ada39de
parent5b391395822575533ab0fc93485fc5554d0da099
strv: declare iterator of FOREACH_STRING() in the loop

Same idea as 03677889f0ef42cdc534bf3b31265a054b20a354.

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.
53 files changed:
src/activate/activate.c
src/basic/fs-util.c
src/basic/os-util.c
src/basic/strv.h
src/basic/unit-file.c
src/boot/bootctl.c
src/cgtop/cgtop.c
src/core/apparmor-setup.c
src/core/cgroup.c
src/core/efi-random.c
src/core/execute.c
src/core/timer.c
src/core/unit.c
src/getty-generator/getty-generator.c
src/home/homectl.c
src/home/homed-manager.c
src/libsystemd/sd-device/sd-device.c
src/locale/localed.c
src/login/logind-user.c
src/nspawn/nspawn-cgroup.c
src/nspawn/nspawn-mount.c
src/nspawn/nspawn.c
src/partition/repart.c
src/portable/portable.c
src/resolve/resolved-resolv-conf.c
src/resolve/test-resolved-etc-hosts.c
src/run/run.c
src/shared/chown-recursive.c
src/shared/discover-image.c
src/shared/dissect-image.c
src/shared/find-esp.c
src/shared/machine-id-setup.c
src/shared/mount-setup.c
src/shared/netif-util.c
src/shared/pager.c
src/shared/psi-util.c
src/shared/switch-root.c
src/shared/tests.c
src/systemctl/systemctl-edit.c
src/systemctl/systemctl-sysv-compat.c
src/test/test-bpf-devices.c
src/test/test-ellipsize.c
src/test/test-env-file.c
src/test/test-execute.c
src/test/test-fileio.c
src/test/test-gpt.c
src/test/test-libcrypt-util.c
src/test/test-loop-block.c
src/test/test-mount-util.c
src/test/test-stat-util.c
src/test/test-strv.c
src/test/test-utf8.c
src/tmpfiles/offline-passwd.c