diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-04-26 23:30:45 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-04 14:57:49 +0200 |
commit | 2f9d1da95a1ad34a56a29953d7b5f7051590cf8d (patch) | |
tree | 38091ddb4c62c3a75c4288d4f1347adb9d3a75c6 /src/basic/io-util.h | |
parent | resolved: directly initialize iovec array (diff) | |
download | systemd-2f9d1da95a1ad34a56a29953d7b5f7051590cf8d.tar.xz systemd-2f9d1da95a1ad34a56a29953d7b5f7051590cf8d.zip |
basic/io-util: move iterator variable declarations into loop headers
Diffstat (limited to 'src/basic/io-util.h')
-rw-r--r-- | src/basic/io-util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/io-util.h b/src/basic/io-util.h index d4bb14fba4..ce54ca228b 100644 --- a/src/basic/io-util.h +++ b/src/basic/io-util.h @@ -25,9 +25,9 @@ int fd_wait_for_event(int fd, int event, usec_t timeout); ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length); static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, size_t n) { - size_t j, r = 0; + size_t r = 0; - for (j = 0; j < n; j++) + for (size_t j = 0; j < n; j++) r += i[j].iov_len; return r; |