blob: 79b58809e1748a6bbc791b2d8e68255e71376ef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
/* ISC license. */
#include <skalibs/bytestr.h>
#include <skalibs/bufalloc.h>
void bufalloc_clean (register bufalloc *ba)
{
if (ba->p)
{
byte_copy(ba->x.s, ba->x.len - ba->p, ba->x.s + ba->p) ;
ba->x.len -= ba->p ;
ba->p = 0 ;
}
}
|