diff options
Diffstat (limited to 'src/libsystemd-bus/bus-socket.c')
-rw-r--r-- | src/libsystemd-bus/bus-socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-socket.c b/src/libsystemd-bus/bus-socket.c index 4dafe1fdb7..4a07869157 100644 --- a/src/libsystemd-bus/bus-socket.c +++ b/src/libsystemd-bus/bus-socket.c @@ -72,7 +72,7 @@ static int append_iovec(sd_bus_message *m, const void *p, size_t sz) { static int bus_message_setup_iovec(sd_bus_message *m) { struct bus_body_part *part; - unsigned n; + unsigned n, i; int r; assert(m); @@ -102,7 +102,7 @@ static int bus_message_setup_iovec(sd_bus_message *m) { return r; } - for (part = &m->body; part && part->size > 0; part = part->next) { + for (i = 0, part = &m->body; i < m->n_body_parts; i++, part = part->next) { r = append_iovec(m, part->data, part->size); if (r < 0) return r; |