[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>
This commit is contained in:
committed by
Linus Torvalds
parent
e5e3e0f500
commit
dcde55bc58
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user