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 <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-08-10 00:56:40 -07:00
parent 306ea2df03
commit 242abf106c

View File

@ -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;