bzip2: reduce indentation, no code changes
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 3 Feb 2018 14:59:46 +0000 (15:59 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 3 Feb 2018 14:59:46 +0000 (15:59 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libarchive/bz/compress.c

index 6260fd94cd606a1893eb2cd05b5e065019de4f4c..f1393242d654da84ea347f57e86d9cf3ffc2c8d2 100644 (file)
@@ -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]++;
                }
        }