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>
Junio C Hamano committed
Aug 10, 2006 at 00:56 UTC
242abf106c6929028c2dc916504879885cd64d4d
1 file changed
+1
-3
builtin-apply.c
+1
-3
@@ -1700,10 +1700,8 @@ static int apply_data(struct patch *patch, struct stat *st, struct cache_entry *
1700
return -1;
1701
1702
/* NUL terminate the result */
1703
- if (desc.alloc <= desc.size) {
1703
+ if (desc.alloc <= desc.size)
1704
desc.buffer = xrealloc(desc.buffer, desc.size + 1);
1705
- desc.alloc++;
1706
- }
1705
desc.buffer[desc.size] = 0;
1706
1707
patch->result = desc.buffer;