buffer: Fix some assertions in

This commit is contained in:
Xavier Mendez 2015-02-21 21:36:05 +01:00
parent 021f4304a3
commit a24a17a415

View file

@ -21,6 +21,7 @@ void hoedown_buffer_init(
}
void hoedown_buffer_uninit(hoedown_buffer *buf) {
assert(buf && buf->unit);
buf->data_free(buf->data);
}
@ -107,8 +108,6 @@ int hoedown_buffer_eqs(const hoedown_buffer *buf, const char *str) {
}
int hoedown_buffer_prefix(const hoedown_buffer *buf, const char *prefix) {
assert(buf && buf->unit);
for (size_t i = 0; i < buf->size; ++i) {
if (prefix[i] == 0)
return 0;