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/cmd-inet/common/kcmd.c
          +++ new/usr/src/cmd/cmd-inet/common/kcmd.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * advertising materials, and other materials related to such
  14   14   * distribution and use acknowledge that the software was developed
  15   15   * by the University of California, Berkeley.  The name of the
  16   16   * University may not be used to endorse or promote products derived
  17   17   * from this software without specific prior written permission.
  18   18   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  19   19   * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  20   20   * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21   21   */
  22   22  
       23 +/*
       24 + * Copyright (c) 2018, Joyent, Inc.
       25 + */
       26 +
  23   27  /* derived from @(#)rcmd.c      5.17 (Berkeley) 6/27/88 */
  24   28  
  25   29  #include <unistd.h>
  26   30  #include <stdlib.h>
  27   31  #include <stdio.h>
  28   32  #include <ctype.h>
  29   33  #include <string.h>
  30   34  #include <pwd.h>
  31   35  #include <sys/param.h>
  32   36  #include <sys/types.h>
↓ open down ↓ 372 lines elided ↑ open up ↑
 405  409                          if (c == '\n')
 406  410                                  break;
 407  411                  }
 408  412                  status = -1;
 409  413                  goto bad2;
 410  414          }
 411  415          (void) sigprocmask(SIG_SETMASK, &oldmask, (sigset_t *)0);
 412  416          *sock = s;
 413  417  
 414  418          /* pass back credentials if wanted */
 415      -        if (cred) (void) krb5_copy_creds(bsd_context, ret_cred, cred);
 416      -                krb5_free_creds(bsd_context, ret_cred);
      419 +        if (cred)
      420 +                (void) krb5_copy_creds(bsd_context, ret_cred, cred);
      421 +
      422 +        krb5_free_creds(bsd_context, ret_cred);
      423 +
 417  424          /*
 418  425           * Initialize *authconp to auth_context, so
 419  426           * that the clients can make use of it
 420  427           */
 421  428          *authconp = auth_context;
 422  429  
 423  430          return (0);
 424  431  bad2:
 425  432          if (fd2p != NULL)
 426  433                  (void) close(*fd2p);
↓ open down ↓ 362 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX