* msgfilter.c (prepare_read): Simplify the last commit
06e206f5,
by always adding 1 to the buffer size.
+2014-11-28 Daiki Ueno <ueno@gnu.org>
+
+ * msgfilter.c (prepare_read): Simplify the last commit 06e206f5,
+ by always adding 1 to the buffer size.
+
2014-11-28 Daiki Ueno <ueno@gnu.org>
msgfilter: Fix read buffer allocation for empty input
if (l->length == l->allocated)
{
- l->allocated = l->allocated
- + (l->allocated < 2 ? 1 : (l->allocated >> 1));
+ l->allocated = l->allocated + (l->allocated >> 1) + 1;
l->result = (char *) xrealloc (l->result, l->allocated);
}
*num_bytes_p = l->allocated - l->length;