From e59e5ff96e9461dc658748509ec41408c140f6fb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 3 Feb 2018 15:59:46 +0100 Subject: bzip2: reduce indentation, no code changes Signed-off-by: Denys Vlasenko --- archival/libarchive/bz/compress.c | 89 ++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 44 deletions(-) (limited to 'archival/libarchive/bz') diff --git a/archival/libarchive/bz/compress.c b/archival/libarchive/bz/compress.c index 6260fd94c..f1393242d 100644 --- a/archival/libarchive/bz/compress.c +++ b/archival/libarchive/bz/compress.c @@ -216,56 +216,57 @@ void generateMTFValues(EState* s) if (yy[0] == ll_i) { zPend++; - } else { - if (zPend > 0) { + continue; + } + + if (zPend > 0) { process_zPend: - zPend--; - while (1) { + zPend--; + while (1) { #if 0 - if (zPend & 1) { - mtfv[wr] = BZ_RUNB; wr++; - s->mtfFreq[BZ_RUNB]++; - } else { - mtfv[wr] = BZ_RUNA; wr++; - s->mtfFreq[BZ_RUNA]++; - } + if (zPend & 1) { + mtfv[wr] = BZ_RUNB; wr++; + s->mtfFreq[BZ_RUNB]++; + } else { + mtfv[wr] = BZ_RUNA; wr++; + s->mtfFreq[BZ_RUNA]++; + } #else /* same as above, since BZ_RUNA is 0 and BZ_RUNB is 1 */ - unsigned run = zPend & 1; - mtfv[wr] = run; - wr++; - s->mtfFreq[run]++; + unsigned run = zPend & 1; + mtfv[wr] = run; + wr++; + s->mtfFreq[run]++; #endif - zPend -= 2; - if (zPend < 0) - break; - zPend = (unsigned)zPend / 2; - /* bbox: unsigned div is easier */ - } - if (i < 0) /* came via "goto process_zPend"? exit */ - goto end; - zPend = 0; + zPend -= 2; + if (zPend < 0) + break; + zPend = (unsigned)zPend / 2; + /* bbox: unsigned div is easier */ } - { - register uint8_t rtmp; - register uint8_t* ryy_j; - register uint8_t rll_i; - rtmp = yy[1]; - yy[1] = yy[0]; - ryy_j = &(yy[1]); - rll_i = ll_i; - while (rll_i != rtmp) { - register uint8_t rtmp2; - ryy_j++; - rtmp2 = rtmp; - rtmp = *ryy_j; - *ryy_j = rtmp2; - } - yy[0] = rtmp; - j = ryy_j - &(yy[0]); - mtfv[wr] = j+1; - wr++; - s->mtfFreq[j+1]++; + if (i < 0) /* came via "goto process_zPend"? exit */ + goto end; + zPend = 0; + } + { + register uint8_t rtmp; + register uint8_t* ryy_j; + register uint8_t rll_i; + rtmp = yy[1]; + yy[1] = yy[0]; + ryy_j = &(yy[1]); + rll_i = ll_i; + while (rll_i != rtmp) { + register uint8_t rtmp2; + ryy_j++; + rtmp2 = rtmp; + rtmp = *ryy_j; + *ryy_j = rtmp2; } + yy[0] = rtmp; + j = ryy_j - &(yy[0]); + mtfv[wr] = j+1; + wr++; + s->mtfFreq[j+1]++; } } -- cgit v1.2.3