From: Junio C Hamano Date: Thu, 10 Aug 2006 07:56:40 +0000 (-0700) Subject: builtin-apply: remove unused increment X-Git-Tag: v1.4.2~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=242abf106c6929028c2dc916504879885cd64d4d;p=git.git builtin-apply: remove unused increment We do not use desc.alloc after assigning desc.buffer to patch->result; do not bother to increment it. Signed-off-by: Junio C Hamano --- diff --git a/builtin-apply.c b/builtin-apply.c index c15987386..be2c7152c 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -1700,10 +1700,8 @@ static int apply_data(struct patch *patch, struct stat *st, struct cache_entry * return -1; /* NUL terminate the result */ - if (desc.alloc <= desc.size) { + if (desc.alloc <= desc.size) desc.buffer = xrealloc(desc.buffer, desc.size + 1); - desc.alloc++; - } desc.buffer[desc.size] = 0; patch->result = desc.buffer;