From d67a0999aafb8a7f6a7315797561f77a429a4173 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 10 Aug 2023 12:13:46 +0200 Subject: [PATCH] coredump: let's use FOREACH_ARRAY() at once very obvious place --- src/coredump/coredump.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 9a2066858d3..659eae3b3e7 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -1473,11 +1473,8 @@ static int process_backtrace(int argc, char *argv[]) { /* The imported iovecs are not supposed to be freed by us so let's store * them at the end of the array so we can skip them while freeing the * rest. */ - for (size_t i = 0; i < importer.iovw.count; i++) { - struct iovec *iovec = importer.iovw.iovec + i; - + FOREACH_ARRAY(iovec, importer.iovw.iovec, importer.iovw.count) iovw_put(iovw, iovec->iov_base, iovec->iov_len); - } } r = sd_journal_sendv(iovw->iovec, iovw->count); -- 2.47.3