summary refs log tree commit diff
path: root/src/libstddjb/siovec_len.c
blob: 2f4f55697c2f3dcba622a8767b6d32ff9fb5177a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <sys/uio.h>
#include <skalibs/siovec.h>

size_t siovec_len (struct iovec const *v, unsigned int n)
{
  size_t w = 0 ;
  while (n--) w += v[n].iov_len ;
  return w ;
}