Print this page
10120 smatch indenting fixes for usr/src/cmd
Reviewed by: Gergő Doma <domag02@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/compress/compress.c
          +++ new/usr/src/cmd/compress/compress.c
↓ open down ↓ 5 lines elided ↑ open up ↑
   6    6  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
   7    7  /*        All Rights Reserved   */
   8    8  
   9    9  
  10   10  /*
  11   11   * Copyright (c) 1986 Regents of the University of California.
  12   12   * All rights reserved.  The Berkeley software License Agreement
  13   13   * specifies the terms and conditions for redistribution.
  14   14   */
  15   15  
  16      -#pragma ident   "%Z%%M% %I%     %E% SMI"
       16 +/*
       17 + * Copyright (c) 2018, Joyent, Inc.
       18 + */
  17   19  
  18   20  /*
  19   21   * Compress - data compression program
  20   22   */
  21   23  #define min(a, b)       ((a > b) ? b : a)
  22   24  
  23   25  /*
  24   26   * machine variants which require cc -Dmachine:  pdp11, z8000, pcxt
  25   27   */
  26   28  
↓ open down ↓ 781 lines elided ↑ open up ↑
 808  810                          }
 809  811                          precious = 0;
 810  812                          if (!quiet) {
 811  813                                  (void) fprintf(stderr, "%s: ",
 812  814                                      *fileptr);
 813  815                                  newline_needed = 1;
 814  816                          }
 815  817                  } else if (!quiet && !do_decomp) {
 816  818                          (void) fprintf(stderr, "%s: ",
 817  819                              *fileptr);
 818      -                                newline_needed = 1;
      820 +                        newline_needed = 1;
 819  821                  }
 820  822  
 821  823                  /* Actually do the compression/decompression */
 822  824  
 823  825                  if ((jmpval = setjmp(env)) == 0) {
 824  826                          /* We'll see how things go */
 825  827  #ifndef DEBUG
 826  828                          if (do_decomp == 0)  {
 827  829                                  compress();
 828  830                          } else {
↓ open down ↓ 472 lines elided ↑ open up ↑
1301 1303                  /* Crash if can't write */
1302 1304                  ioerror();
1303 1305          }
1304 1306          stackp = de_stack;
1305 1307          stack_lim = stack_max;
1306 1308  
1307 1309          while ((code = getcode()) > -1) {
1308 1310  
1309 1311                  if ((code == CLEAR) && block_compress) {
1310 1312                          for (code = 255; code >= 0; code--)
1311      -                        tab_prefixof(code) = 0;
     1313 +                                tab_prefixof(code) = 0;
1312 1314                          clear_flg = 1;
1313 1315                          free_ent = FIRST - 1;
1314 1316                          if ((code = getcode()) == -1)   /* O, untimely death! */
1315 1317                                  break;
1316 1318                  }
1317 1319                  incode = code;
1318 1320                  /*
1319 1321                   * Special case for KwKwK string.
1320 1322                   */
1321 1323                  if (code >= free_ent) {
↓ open down ↓ 474 lines elided ↑ open up ↑
1796 1798                  *(htab_p-8) = m1;
1797 1799                  *(htab_p-7) = m1;
1798 1800                  *(htab_p-6) = m1;
1799 1801                  *(htab_p-5) = m1;
1800 1802                  *(htab_p-4) = m1;
1801 1803                  *(htab_p-3) = m1;
1802 1804                  *(htab_p-2) = m1;
1803 1805                  *(htab_p-1) = m1;
1804 1806                  htab_p -= 16;
1805 1807          } while ((i -= 16) >= 0);
1806      -                for (i += 16; i > 0; i--)
1807      -                        *--htab_p = m1;
     1808 +
     1809 +        for (i += 16; i > 0; i--)
     1810 +                *--htab_p = m1;
1808 1811  }
1809 1812  
1810 1813  static void
1811 1814  prratio(FILE *stream, count_long num, count_long den)
1812 1815  {
1813 1816          int q;  /* store percentage */
1814 1817  
1815 1818          q = (int)(10000LL * (count_long)num / (count_long)den);
1816 1819          if (q < 0) {
1817 1820                  (void) putc('-', stream);
↓ open down ↓ 90 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX