bsdiff-portable

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

commit edd3c4a0339a9ac5b2251e83dbe4a85f9f4863f6
parent fe637e413d68c4ccdb0dc0f11a52e7a6d90e19d0
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Wed, 23 Sep 2020 16:53:53 +1000

Remove useless commas after end brackets

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

diff --git a/bsdiff.c b/bsdiff.c @@ -56,21 +56,21 @@ split(off_t *I, off_t *V, off_t start, off_t len, off_t h) if (V[I[k + i] + h] < x) { x = V[I[k + i] + h]; j = 0; - }; + } if (V[I[k + i] + h] == x) { tmp = I[k + j]; I[k + j] = I[k + i]; I[k + i] = tmp; j++; - }; - }; + } + } for (i = 0; i < j; i++) V[I[k + i]] = k + j - 1; if (j == 1) I[k] = -1; - }; + } return; - }; + } x = V[I[start + len / 2] + h]; jj = 0; @@ -80,7 +80,7 @@ split(off_t *I, off_t *V, off_t start, off_t len, off_t h) jj++; if (V[I[i] + h] == x) kk++; - }; + } jj += start; kk += jj; @@ -100,8 +100,8 @@ split(off_t *I, off_t *V, off_t start, off_t len, off_t h) I[i] = I[kk + k]; I[kk + k] = tmp; k++; - }; - }; + } + } while (jj + j < kk) { if (V[I[jj + j] + h] == x) { @@ -111,8 +111,8 @@ split(off_t *I, off_t *V, off_t start, off_t len, off_t h) I[jj + j] = I[kk + k]; I[kk + k] = tmp; k++; - }; - }; + } + } if (jj > start) split(I, V, start, jj - start, h); @@ -370,8 +370,8 @@ main(int argc, char *argv[]) if (s * 2 - i > Sf * 2 - lenf) { Sf = s; lenf = i; - }; - }; + } + } lenb = 0; if (scan < newsize) { @@ -385,9 +385,9 @@ main(int argc, char *argv[]) if (s * 2 - i > Sb * 2 - lenb) { Sb = s; lenb = i; - }; - }; - }; + } + } + } if (lastscan + lenf > scan - lenb) { overlap = (lastscan + lenf) - (scan - lenb); @@ -405,12 +405,12 @@ main(int argc, char *argv[]) if (s > Ss) { Ss = s; lens = i + 1; - }; - }; + } + } lenf += lens - overlap; lenb -= lens; - }; + } for (i = 0; i < lenf; i++) db[dblen + i] = @@ -439,8 +439,8 @@ main(int argc, char *argv[]) lastscan = scan - lenb; lastpos = pos - lenb; lastoffset = pos - scan; - }; - }; + } + } BZ2_bzWriteClose(&bz2err, pfbz2, 0, NULL, NULL); if (bz2err != BZ_OK) errx(1, "BZ2_bzWriteClose, bz2err = %d", bz2err);