From 242abf106c6929028c2dc916504879885cd64d4d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 10 Aug 2006 00:56:40 -0700 Subject: [PATCH] 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 --- builtin-apply.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/builtin-apply.c b/builtin-apply.c index c15987386b..be2c7152cd 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; -- 2.11.4.GIT