projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
946dc7c
)
coredump: let's use FOREACH_ARRAY() at once very obvious place
author
Lennart Poettering
<lennart@poettering.net>
Thu, 10 Aug 2023 10:13:46 +0000
(12:13 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 10 Aug 2023 10:13:46 +0000
(12:13 +0200)
src/coredump/coredump.c
patch
|
blob
|
history
diff --git
a/src/coredump/coredump.c
b/src/coredump/coredump.c
index 9a2066858d3b05b88a8ec9bce3f985edcd28c182..659eae3b3e780a1468c20ca624cec295912a9643 100644
(file)
--- 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);