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/valtools/ckitem.c
          +++ new/usr/src/cmd/valtools/ckitem.c
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21   */
  22   22  /*
  23   23   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   28  /*        All Rights Reserved   */
  29   29  
  30   30  
  31      -#pragma ident   "%Z%%M% %I%     %E% SMI"
       31 +/*
       32 + * Copyright (c) 2018, Joyent, Inc.
       33 + */
  32   34  
  33   35  #include <stdio.h>
  34   36  #include <ctype.h>
  35   37  #include <string.h>
  36   38  #include <signal.h>
  37   39  #include <valtools.h>
  38   40  #include <stdlib.h>
  39   41  #include <locale.h>
  40   42  #include <libintl.h>
  41   43  #include <limits.h>
↓ open down ↓ 97 lines elided ↑ open up ↑
 139  141  #define TEXT_DOMAIN     "SYS_TEST"
 140  142  #endif
 141  143          (void) textdomain(TEXT_DOMAIN);
 142  144  
 143  145          prog = prog_name(argv[0]);
 144  146  
 145  147          invis = (char **)calloc(invismaxsize, sizeof (char *));
 146  148          if (!invis) {
 147  149                  (void) fprintf(stderr,
 148  150                          gettext("Not enough memory\n"));
 149      -                        exit(1);
      151 +                exit(1);
 150  152          }
 151  153          while ((c = getopt(argc, argv, "m:oni:l:f:ud:p:e:h:k:s:QW:?")) != EOF) {
 152  154                  /* check for invalid option */
 153  155                  if ((*prog == 'e') && !strchr(eusage, c))
 154  156                          usage(); /* no valid options */
 155  157                  if ((*prog == 'h') && !strchr(husage, c))
 156  158                          usage();
 157  159  
 158  160                  switch (c) {
 159  161                  case 'Q':
↓ open down ↓ 30 lines elided ↑ open up ↑
 190  192  
 191  193                  case 'i':
 192  194                          invis[ninvis++] = optarg;
 193  195                          if (ninvis == invismaxsize) {
 194  196                                  invismaxsize += INVISMAXSIZE;
 195  197                                  invis = (char **)realloc(invis,
 196  198                                                  invismaxsize * sizeof (char *));
 197  199                                  if (!invis) {
 198  200                                          (void) fprintf(stderr,
 199  201                                                  gettext("Not enough memory\n"));
 200      -                                                exit(1);
      202 +                                        exit(1);
 201  203                                  }
 202  204                                  (void) memset(invis + ninvis, 0,
 203  205                                          (invismaxsize - ninvis) *
 204  206                                          sizeof (char *));
 205  207                          }
 206  208                          break;
 207  209  
 208  210                  case 'l':
 209  211                          label = optarg;
 210  212                          break;
↓ open down ↓ 157 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX