core/import-creds: use FOREACH_ARRAY at one more place

This commit is contained in:
Mike Yuan
2024-09-11 17:20:50 +02:00
parent d0fcb614cb
commit 61e018dfad

View File

@@ -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;