blob: e6ddfc270d2a58da0b65bfd9d04f6b89f2831964 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
/* ISC license. */
#include <skalibs/allreadwrite.h>
#include <skalibs/bufalloc.h>
int bufalloc_flush (bufalloc *ba)
{
ba->p += allreadwrite((iofunc_t_ref)ba->op, ba->fd, ba->x.s + ba->p, ba->x.len - ba->p) ;
bufalloc_clean(ba) ;
return !ba->x.len ;
}
|