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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/usr.sbin/ipadm/ipadm.c
          +++ new/usr/src/cmd/cmd-inet/usr.sbin/ipadm/ipadm.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2017 Nexenta Systems, Inc.
       25 + * Copyright 2017 Gary Mills
  25   26   */
  26   27  
  27   28  #include <arpa/inet.h>
  28   29  #include <errno.h>
  29   30  #include <getopt.h>
  30   31  #include <inet/ip.h>
  31   32  #include <inet/iptun.h>
  32   33  #include <inet/tunables.h>
  33   34  #include <libdladm.h>
  34   35  #include <libdliptun.h>
↓ open down ↓ 465 lines elided ↑ open up ↑
 500  501   * Print individual columns for the show-*prop subcommands.
 501  502   */
 502  503  static void
 503  504  print_prop(show_prop_state_t *statep, uint_t flags, char *buf, size_t bufsize)
 504  505  {
 505  506          const char              *prop_name = statep->sps_pname;
 506  507          char                    *ifname = statep->sps_ifname;
 507  508          char                    *propval = statep->sps_propval;
 508  509          uint_t                  proto = statep->sps_proto;
 509  510          size_t                  propsize = MAXPROPVALLEN;
 510      -        char                    *object;
 511  511          ipadm_status_t          status;
 512  512  
 513  513          if (statep->sps_ifprop) {
 514  514                  status = ipadm_get_ifprop(iph, ifname, prop_name, propval,
 515  515                      &propsize, proto, flags);
 516      -                object = ifname;
 517  516          } else if (statep->sps_modprop) {
 518  517                  status = ipadm_get_prop(iph, prop_name, propval, &propsize,
 519  518                      proto, flags);
 520      -                object = ipadm_proto2str(proto);
 521  519          } else {
 522  520                  status = ipadm_get_addrprop(iph, prop_name, propval, &propsize,
 523  521                      statep->sps_aobjname, flags);
 524      -                object = statep->sps_aobjname;
 525  522          }
 526  523  
 527  524          if (status != IPADM_SUCCESS) {
 528  525                  if ((status == IPADM_NOTFOUND && (flags & IPADM_OPT_PERSIST)) ||
 529  526                      status == IPADM_ENXIO) {
 530  527                          propval[0] = '\0';
 531  528                          goto cont;
 532  529                  }
 533  530                  statep->sps_status = status;
 534  531                  statep->sps_retstatus = status;
↓ open down ↓ 1681 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX