summaryrefslogtreecommitdiff
path: root/src/libstddjb/iobuffer_fill.c
blob: 991dffc98f949b66925444d7d247c0344d787e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ISC license. */

#include <errno.h>
#include <skalibs/iobuffer.h>

int iobuffer_fill (iobuffer_ref b)
{
  if (b->isk)
  {
    register int r = iobufferk_fill(&b->x.k) ;
    if (r >= 0 || errno != ENOSYS || !iobuffer_salvage(b)) return r ;
  }
  return iobufferu_fill(&b->x.u) ;
}