blob: 28bd35e7814cefbc5501bc0fae4f61ef50eb92db (
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_ref 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 ;
}
}
|