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

#include <sys/types.h>
#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 ;
}