From: Lennart Poettering Date: Thu, 10 Aug 2023 10:13:46 +0000 (+0200) Subject: coredump: let's use FOREACH_ARRAY() at once very obvious place X-Git-Tag: v255-rc1~756^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F28760%2Fhead;p=thirdparty%2Fsystemd.git coredump: let's use FOREACH_ARRAY() at once very obvious place --- 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);