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

#include <sys/types.h>
#include <skalibs/cbuffer.h>

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