]> git.ipfire.org Git - thirdparty/git.git/commit - diff-delta.c
diff-delta: fold two special tests into one plus cleanups
authorNicolas Pitre <nico@cam.org>
Wed, 22 Feb 2006 01:41:41 +0000 (20:41 -0500)
committerJunio C Hamano <junkio@cox.net>
Wed, 22 Feb 2006 08:36:09 +0000 (00:36 -0800)
commitfe474b588b3cb1c23c987a3d0f9e869a160d82d2
tree3cd775ae87a14604cf302d905e5fc409fab380b0
parentcac251d0bc4c68b7ab36026990aff3c783913ae6
diff-delta: fold two special tests into one plus cleanups

Testing for realloc and size limit can be done with only one test per
loop. Make it so and fix a theoretical off-by-one comparison error in
the process.

The output buffer memory allocation is also bounded by max_size when
specified.

Finally make some variable unsigned to allow the handling of files up to
4GB in size instead of 2GB.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
diff-delta.c