diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-17 07:28:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-17 07:28:15 -0700 |
commit | 0875f85d8bb6cf61b6a9ed612936712d5fd0f66a (patch) | |
tree | 4e29634f339c554be2cb8f66d189df71bfb5af01 | |
parent | d9852ccd9cdfbffb3e4e2ec0c4c8031ce7edc4f8 (diff) | |
download | txr-0875f85d8bb6cf61b6a9ed612936712d5fd0f66a.tar.gz txr-0875f85d8bb6cf61b6a9ed612936712d5fd0f66a.tar.bz2 txr-0875f85d8bb6cf61b6a9ed612936712d5fd0f66a.zip |
buffers: comment added in buf_shrink.
* buf.c (buf_shrink): It's not immediately obvious why len is
incremented by one if it is zero.
-rw-r--r-- | buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -175,7 +175,7 @@ static void buf_shrink(struct buf *b) val len = b->len; if (len == zero) - len = succ(len); + len = succ(len); /* avoid reallocing to zero length; i.e. freeing */ if (len != b->size) { b->data = chk_realloc(b->data, c_num(len)); |