diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-10 00:56:40 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-10 00:56:40 -0700 |
commit | 242abf106c6929028c2dc916504879885cd64d4d (patch) | |
tree | ef35f66586d76d364461d3482bb85c0032bfe80b /builtin-apply.c | |
parent | 306ea2df03322ac8c29f4eb5a968acb7ef3c8f72 (diff) | |
download | git-242abf106c6929028c2dc916504879885cd64d4d.tar.gz git-242abf106c6929028c2dc916504879885cd64d4d.tar.xz |
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>
Diffstat (limited to 'builtin-apply.c')
-rw-r--r-- | builtin-apply.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |