summaryrefslogtreecommitdiffstats
path: root/src/test/test-fs-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-08 12:30:51 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-05-08 22:47:50 +0200
commit2034c8b8838c9f42d1dc16fbda23d9bc3a2c6f02 (patch)
treef9c20df0ff36af4a0edcb6f6ecb42e16f41be116 /src/test/test-fs-util.c
parentfuzz-journal-remote: allow -ENODATA too (diff)
downloadsystemd-2034c8b8838c9f42d1dc16fbda23d9bc3a2c6f02.tar.xz
systemd-2034c8b8838c9f42d1dc16fbda23d9bc3a2c6f02.zip
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.
Diffstat (limited to 'src/test/test-fs-util.c')
-rw-r--r--src/test/test-fs-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index f24e97b4cc..5d9d99e272 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -712,7 +712,7 @@ TEST(rename_noreplace) {
j = strjoina(z, table[4]);
(void) symlink("foobar", j);
- STRV_FOREACH(a, (char**) table) {
+ STRV_FOREACH(a, table) {
_cleanup_free_ char *x = NULL, *y = NULL;
x = strjoin(z, *a);
@@ -723,7 +723,7 @@ TEST(rename_noreplace) {
continue;
}
- STRV_FOREACH(b, (char**) table) {
+ STRV_FOREACH(b, table) {
_cleanup_free_ char *w = NULL;
w = strjoin(z, *b);