bsdiff-portable

A more portable version of Colin Percival's bsdiff
git clone git://git.sgregoratto.me/bsdiff-portable
Log | Files | Refs | README | LICENSE

commit a8fc680d49c967d1409bf3d39c8240727ea4c294
parent 43c561230cff795381ea1a8377b7f0514da51a72
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Thu, 24 Sep 2020 15:16:23 +1000

bsdiff: rename ctrl block buffer

Diffstat:
Mbsdiff.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bsdiff.c b/bsdiff.c @@ -82,7 +82,7 @@ main(int argc, char **argv) off_t i; off_t dblen, eblen; uint8_t *db, *eb; - uint8_t buf[24]; + uint8_t ctrlbuf[24]; struct bsdiff_header header = {"BSDIFF40", 0, 0, 0}; FILE *pf; @@ -219,10 +219,10 @@ main(int argc, char **argv) } } /* Compute the size of the blocks and write them */ - offtout(lenf, buf); - offtout((scan - lenb) - (lastscan + lenf), buf + 8); - offtout((pos - lenb) - (lastpos + lenf), buf + 16); - filelen += bz_write(pf, buf, sizeof(buf)); + offtout(lenf, ctrlbuf); + offtout((scan - lenb) - (lastscan + lenf), ctrlbuf + 8); + offtout((pos - lenb) - (lastpos + lenf), ctrlbuf + 16); + filelen += bz_write(pf, ctrlbuf, sizeof(ctrlbuf)); header.ctrl_block_len = filelen - 32; for (i = 0; i < lenf; i++)