Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/svcprop/svcprop.c
          +++ new/usr/src/cmd/svc/svcprop/svcprop.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
  28      - * Copyright (c) 2011, Joyent, Inc. All rights reserved.
       28 + * Copyright 2019 Joyent, Inc.
  29   29   */
  30   30  
  31   31  /*
  32   32   * svcprop - report service configuration properties
  33   33   */
  34   34  
  35   35  #include <locale.h>
  36   36  #include <libintl.h>
  37   37  #include <libscf.h>
  38   38  #include <libscf_priv.h>
↓ open down ↓ 584 lines elided ↑ open up ↑
 623  623  
 624  624                          buf = safe_malloc(max_scf_fmri_length + 1);
 625  625                          if (scf_pg_to_fmri(pg, buf, max_scf_fmri_length + 1) ==
 626  626                              -1)
 627  627                                  scfdie();
 628  628  
 629  629                          uu_xdie(UU_EXIT_USAGE, gettext("-p argument `%s/%s' "
 630  630                              "has too many components for property "
 631  631                              "group `%s'.\n"), spn->spn_comp1, spn->spn_comp2,
 632  632                              buf);
 633      -
 634      -                        free(buf);
 635  633                  }
 636  634  
 637  635                  if (scf_pg_get_property(pg, spn->spn_comp1, prop) == 0) {
 638  636                          if (!quiet)
 639  637                                  display_prop(pg, prop);
 640  638                          continue;
 641  639                  }
 642  640  
 643  641                  if (scf_error() != SCF_ERROR_NOT_FOUND)
 644  642                          scfdie();
↓ open down ↓ 503 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX