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

#include <skalibs/cbuffer.h>

size_t cbuffer_rseek (cbuffer *b, size_t len)
{
  size_t max = cbuffer_len(b) ;
  if (len > max) len = max ;
  return cbuffer_RSEEK(b, len) ;
}