Skip to content

Commit

Permalink
builtin-apply: remove unused increment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Aug 10, 2006
1 parent 306ea2d commit 242abf1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 242abf1

Please sign in to comment.