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/cat/cat.c
          +++ new/usr/src/cmd/cat/cat.c
↓ open down ↓ 19 lines elided ↑ open up ↑
  20   20   */
  21   21  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  22   22  /*        All Rights Reserved   */
  23   23  
  24   24  
  25   25  /*
  26   26   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  27   27   * Use is subject to license terms.
  28   28   */
  29   29  
       30 +/*
       31 + * Copyright (c) 2018, Joyent, Inc.
       32 + */
  30   33  
  31   34  /*
  32   35   *      Concatenate files.
  33   36   */
  34   37  
  35   38  #include        <stdio.h>
  36   39  #include        <stdlib.h>
  37   40  #include        <ctype.h>
  38   41  #include        <sys/types.h>
  39   42  #include        <sys/stat.h>
↓ open down ↓ 224 lines elided ↑ open up ↑
 264  267                  /*
 265  268                   * If the source is not a character special file, socket or a
 266  269                   * block special file, make sure it is not identical
 267  270                   * to the target.
 268  271                   */
 269  272  
 270  273                  if (!S_ISCHR(target.st_mode) &&
 271  274                      !S_ISBLK(target.st_mode) &&
 272  275                      !S_ISSOCK(target.st_mode) &&
 273  276                      IDENTICAL(target, source)) {
 274      -                        if (!silent)
 275      -                        (void) fprintf(stderr,
 276      -                            gettext("cat: input/output files '%s' identical\n"),
 277      -                            stdinflg?"-": *argv);
      277 +                        if (!silent) {
      278 +                                (void) fprintf(stderr, gettext("cat: "
      279 +                                    "input/output files '%s' identical\n"),
      280 +                                    stdinflg?"-": *argv);
      281 +                        }
      282 +
 278  283                          if (fclose(fi) != 0)
 279  284                                  (void) fprintf(stderr,
 280  285                                      gettext("cat: close error: %s\n"),
 281  286                                      strerror(errno));
 282  287                          status = 2;
 283  288                          continue;
 284  289                  }
 285  290                  ibsize = source.st_blksize;
 286  291  
 287  292                  /*
↓ open down ↓ 344 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX