diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2015-06-07 14:04:20 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2015-06-07 21:42:15 +0200 |
commit | dbfd2eba6427893cb48587d914719402252855b2 (patch) | |
tree | 38b65e30555b94950aaca46d26c6ec9774536e2c /src | |
parent | a87b62a8eb42ee5bf6307f6c140bb400c860bcdd (diff) |
Remove useless code in cmark_strbuf_grow
cmark_strbuf_grow will never truncate a buffer.
Diffstat (limited to 'src')
-rw-r--r-- | src/buffer.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/buffer.c b/src/buffer.c index d39828e..f74c8c6 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -82,11 +82,6 @@ void cmark_strbuf_grow(cmark_strbuf *buf, bufsize_t target_size) buf->asize = (bufsize_t)new_size; buf->ptr = new_ptr; - - /* truncate the existing buffer size if necessary */ - if (buf->size >= buf->asize) - buf->size = buf->asize - 1; - buf->ptr[buf->size] = '\0'; } size_t cmark_strbuf_len(const cmark_strbuf *buf) |