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

#include <skalibs/cbuffer.h>

unsigned int cbuffer_unget (cbuffer_t *b, unsigned int len)
{
  register unsigned int max = cbuffer_available(b) ;
  if (len > max) len = max ;
  return cbuffer_UNGET(b, len) ;
}