Print this page
8485 Remove set but unused variables in usr/src/cmd

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/ypcmd/ypserv.c
          +++ new/usr/src/cmd/ypcmd/ypserv.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   *
  14   14   * When distributing Covered Code, include this CDDL HEADER in each
  15   15   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
       23 + * Copyright 2017 Gary Mills
  23   24   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27   28  /*      Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T     */
  28   29  /*        All Rights Reserved   */
  29   30  
  30   31  /*
  31   32   * Portions of this source code were derived from Berkeley 4.3 BSD
  32   33   * under license from the Regents of the University of California.
  33   34   */
  34   35  
  35      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  36      -
  37   36  /*
  38   37   * This contains the mainline code for the YP server.  Data
  39   38   * structures which are process-global are also in this module.
  40   39   */
  41   40  
  42   41  /* this is so that ypserv will compile under 5.5 */
  43   42  #define _SVID_GETTOD
  44   43  #include <sys/time.h>
  45   44  extern int gettimeofday(struct timeval *);
  46   45  
↓ open down ↓ 120 lines elided ↑ open up ↑
 167  166  
 168  167  int             service_classes[MAXSERVICES];
 169  168  
 170  169  /*
 171  170   * Does startup processing for the yp server.
 172  171   */
 173  172  static void
 174  173  ypinit(int argc, char **argv)
 175  174  {
 176  175          int pid;
 177      -        int stat, t;
      176 +        int stat;
 178  177          struct sigaction act;
 179  178          int ufd, tfd;
 180  179          SVCXPRT *utransp, *ttransp;
 181  180          struct netconfig *nconf;
 182  181          int connmaxrec = RPC_MAXDATASIZE;
 183  182          int i, j, services = 0;
 184  183  
 185  184  
 186  185          /*
 187  186           * Init yptol flags. Will get redone by init_lock_system() but we need
↓ open down ↓ 42 lines elided ↑ open up ↑
 230  229          if (silent) {
 231  230                  freopen("/dev/null", "r", stdin);
 232  231                  if (access(logfile, _IOWRT)) {
 233  232                      freopen("/dev/null", "w", stdout);
 234  233                      freopen("/dev/null", "w", stderr);
 235  234                  } else {
 236  235                      freopen(logfile, "a", stdout);
 237  236                      freopen(logfile, "a", stderr);
 238  237                  }
 239  238  
 240      -                t = open("/dev/tty", 2);
      239 +                (void) open("/dev/tty", 2);
 241  240  
 242  241                  setpgrp();
 243  242          }
 244  243  
 245  244  #ifdef  SYSVCONFIG
 246  245          sigset(SIGHUP, (void (*)())sysvconfig);
 247  246  #else
 248  247          sigset(SIGHUP, SIG_IGN);
 249  248  #endif
 250  249  
↓ open down ↓ 393 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX