diff options
Diffstat (limited to 'src/libstddjb/siovec_gather.c')
-rw-r--r-- | src/libstddjb/siovec_gather.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/siovec_gather.c b/src/libstddjb/siovec_gather.c index c4138b6..a037b0c 100644 --- a/src/libstddjb/siovec_gather.c +++ b/src/libstddjb/siovec_gather.c @@ -11,7 +11,7 @@ size_t siovec_gather (struct iovec const *v, unsigned int n, char *s, size_t max for (; i < n && w < max ; i++) { size_t len = v[i].iov_len ; - if ((w + len) > max) len = max - w ; + if (len > max - w) len = max - w ; memmove(s + w, v[i].iov_base, len) ; w += len ; } |