]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/io-util.h
tree-wide: be more careful with the type of array sizes
[thirdparty/systemd.git] / src / basic / io-util.h
index c34d97c653ed0e28967087e1b4eee424b7964120..e4717b6f30d14f4f1f1a63d75a0027e0515f388c 100644 (file)
@@ -28,9 +28,8 @@ 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, unsigned n) {
-        unsigned j;
-        size_t r = 0;
+static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, size_t n) {
+        size_t j, r = 0;
 
         for (j = 0; j < n; j++)
                 r += i[j].iov_len;
@@ -38,8 +37,8 @@ static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, unsigned n) {
         return r;
 }
 
-static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) {
-        unsigned j;
+static inline size_t IOVEC_INCREMENT(struct iovec *i, size_t n, size_t k) {
+        size_t j;
 
         for (j = 0; j < n; j++) {
                 size_t sub;