skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

buffer_putvflush.c (261B)


      1 /* ISC license. */
      2 
      3 #include <sys/uio.h>
      4 #include <skalibs/buffer.h>
      5 
      6 ssize_t buffer_putvflush (buffer *b, struct iovec const *v, unsigned int n)
      7 {
      8   ssize_t r = buffer_putv(b, v, n) ;
      9   if (r < 0) return -1 ;
     10   if (!buffer_flush(b)) return -1 ;
     11   return r ;
     12 }