summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_putvflush.c
blob: 46f9e0352c023a3f62ae374ef1235413b1540040 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* ISC license. */

#include <skalibs/buffer.h>
#include <skalibs/siovec.h>

int buffer_putvflush (buffer *b, siovec_t const *v, unsigned int n)
{
  int r = buffer_putv(b, v, n) ;
  if (r < 0) return -1 ;
  if (!buffer_flush(b)) return -1 ;
  return r ;
}