diff options
author | Nicolas Pitre <nico@cam.org> | 2005-06-29 02:49:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-29 09:11:38 -0700 |
commit | dcde55bc58ae845307efbdce3a1071f75ccd758e (patch) | |
tree | fc76dbd773c225cef239a0774304335c8116f2bc /diff-delta.c | |
parent | e5e3e0f5001f51fe388d530481e56651729add1a (diff) | |
download | git-dcde55bc58ae845307efbdce3a1071f75ccd758e.tar.gz git-dcde55bc58ae845307efbdce3a1071f75ccd758e.tar.xz |
[PATCH] assorted delta code cleanup
This is a wrap-up patch including all the cleanups I've done to the
delta code and its usage. The most important change is the
factorization of the delta header handling code.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diff-delta.c')
-rw-r--r-- | diff-delta.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/diff-delta.c b/diff-delta.c index 67f60814b..b2ae7b5e6 100644 --- a/diff-delta.c +++ b/diff-delta.c @@ -306,12 +306,13 @@ void *diff_delta(void *from_buf, unsigned long from_size, *orig = i; } - /* next time around the largest possible output is 1 + 4 + 3 */ if (max_size && outpos > max_size) { free(out); delta_cleanup(&bdf); return NULL; } + + /* next time around the largest possible output is 1 + 4 + 3 */ if (outpos > outsize - 8) { void *tmp = out; outsize = outsize * 3 / 2; |