summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_putflush.c
blob: 609d88b2d1de5de59f5a0649c4a53c8a5b92b390 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* ISC license. */

#include <skalibs/buffer.h>

int buffer_putflush (buffer *b, char const *s, unsigned int len)
{
  int r = buffer_put(b, s, len) ;
  if (r < 0) return -1 ;
  if (!buffer_flush(b)) return -1 ;
  return r ;
}