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

#include <errno.h>
#include <skalibs/cbuffer.h>
#include <skalibs/buffer.h>

int buffer_init (buffer *b, iov_func_ref op, int fd, char *s, size_t len)
{
  if (!cbuffer_init(&b->c, s, len)) return 0 ;
  b->fd = fd ;
  b->op = op ;
  return 1 ;
}