Print this page
10130 smatch fixes for usr/src/cmd/fm

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/notify/snmp-notify/common/snmp-notify.c
          +++ new/usr/src/cmd/fm/notify/snmp-notify/common/snmp-notify.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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   */
  25   25  
       26 +/*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
       29 +
  26   30  #include <sys/fm/protocol.h>
  27   31  #include <fm/fmd_snmp.h>
  28   32  #include <fm/fmd_msg.h>
  29   33  #include <fm/libfmevent.h>
  30   34  #include <net-snmp/net-snmp-config.h>
  31   35  #include <net-snmp/net-snmp-includes.h>
  32   36  #include <net-snmp/agent/net-snmp-agent-includes.h>
  33   37  #include <errno.h>
  34   38  #include <locale.h>
  35   39  #include <netdb.h>
↓ open down ↓ 534 lines elided ↑ open up ↑
 570  574                                  nhdl->nh_debug = B_TRUE;
 571  575                                  break;
 572  576                          case 'f':
 573  577                                  run_fg = B_TRUE;
 574  578                                  break;
 575  579                          case 'R':
 576  580                                  nhdl->nh_rootdir = strdup(optarg);
 577  581                                  break;
 578  582                          default:
 579  583                                  free(nhdl);
 580      -                                return (usage(nhdl->nh_pname));
      584 +                                return (usage(argv[0]));
 581  585                          }
 582  586                  }
 583  587          }
 584  588  
 585  589          /*
 586  590           * Set up a signal handler for SIGTERM (and SIGINT if we'll
 587  591           * be running in the foreground) to ensure sure we get a chance to exit
 588  592           * in an orderly fashion.  We also catch SIGHUP, which will be sent to
 589  593           * us by SMF if the service is refreshed.
 590  594           */
↓ open down ↓ 97 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX