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/chown/chown.c
          +++ new/usr/src/cmd/chown/chown.c
↓ open down ↓ 23 lines elided ↑ open up ↑
  24   24   */
  25   25  
  26   26  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  27   27  /*        All Rights Reserved   */
  28   28  
  29   29  /*
  30   30   * Portions of this source code were derived from Berkeley 4.3 BSD
  31   31   * under license from the Regents of the University of California.
  32   32   */
  33   33  
  34      -#pragma ident   "%Z%%M% %I%     %E% SMI"
       34 +/*
       35 + * Copyright (c) 2018, Joyent, Inc.
       36 + */
  35   37  
  36   38  /*
  37   39   * chown [-fhR] uid[:gid] file ...
  38   40   * chown -R [-f] [-H|-L|-P] uid[:gid] file ...
  39   41   * chown -s [-fhR] ownersid[:groupsid] file ...
  40   42   * chown -s -R [-f] [-H|-L|-P] ownersid[:groupsid] file ...
  41   43   */
  42   44  
  43   45  #include <stdio.h>
  44   46  #include <stdlib.h>
↓ open down ↓ 165 lines elided ↑ open up ↑
 210  212                  } else if ((grp = getgrnam(grpp)) != NULL) {
 211  213                          gid = grp->gr_gid;
 212  214                  } else {
 213  215                          if (isnumber(grpp)) {
 214  216                                  errno = 0;
 215  217                                  gid = (gid_t)strtoul(grpp, NULL, 10);
 216  218                                  if (errno != 0) {
 217  219                                          if (errno == ERANGE) {
 218  220                                                  (void) fprintf(stderr, gettext(
 219  221                                                  "chown: group id too large\n"));
 220      -                                                        exit(2);
      222 +                                                exit(2);
 221  223                                          } else {
 222  224                                                  (void) fprintf(stderr, gettext(
 223  225                                                  "chown: invalid group id\n"));
 224  226                                                  exit(2);
 225  227                                          }
 226  228                                  }
 227  229                          } else {
 228  230                                  (void) fprintf(stderr, gettext(
 229  231                                      "chown: unknown group id %s\n"), grpp);
 230  232                                  exit(2);
↓ open down ↓ 314 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX