From: Mike Yuan Date: Wed, 11 Sep 2024 15:20:50 +0000 (+0200) Subject: core/import-creds: use FOREACH_ARRAY at one more place X-Git-Tag: v259-rc1~117^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61e018dfad3269e9b0e81c88cb60349a49d29dcd;p=thirdparty%2Fsystemd.git core/import-creds: use FOREACH_ARRAY at one more place --- diff --git a/src/core/import-creds.c b/src/core/import-creds.c index 99ec2a69b7e..0d830813939 100644 --- a/src/core/import-creds.c +++ b/src/core/import-creds.c @@ -404,8 +404,8 @@ static int import_credentials_qemu(ImportCredentialsContext *c) { return 0; } - for (size_t i = 0; i < de->n_entries; i++) { - const struct dirent *d = de->entries[i]; + FOREACH_ARRAY(i, de->entries, de->n_entries) { + const struct dirent *d = *i; _cleanup_close_ int vfd = -EBADF, rfd = -EBADF, nfd = -EBADF; _cleanup_free_ char *szs = NULL; uint64_t sz;