add kore_buf_reset

This commit is contained in:
PauloMelo 2015-12-11 21:31:59 +00:00
parent 8a6f4a935e
commit d811bf71dc
2 changed files with 7 additions and 0 deletions

View File

@ -576,6 +576,7 @@ void kore_buf_free(struct kore_buf *);
struct kore_buf *kore_buf_create(u_int32_t);
void kore_buf_append(struct kore_buf *, const void *, u_int32_t);
u_int8_t *kore_buf_release(struct kore_buf *, u_int32_t *);
void kore_buf_reset(struct kore_buf *);
void kore_buf_appendf(struct kore_buf *, const char *, ...);
void kore_buf_appendv(struct kore_buf *, const char *, va_list);

View File

@ -140,3 +140,9 @@ kore_buf_replace_string(struct kore_buf *b, char *src, void *dst, size_t len)
off = off + len;
}
}
void
kore_buf_reset(struct kore_buf *buf)
{
buf->offset = 0;
}