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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/notify/smtp-notify/common/smtp-notify.c
          +++ new/usr/src/cmd/fm/notify/smtp-notify/common/smtp-notify.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   */
       25 +
       26 +/*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
       29 +
  25   30  #include <stdio.h>
  26   31  #include <stdlib.h>
  27   32  #include <string.h>
  28   33  #include <alloca.h>
  29   34  #include <errno.h>
  30   35  #include <fcntl.h>
  31   36  #include <libscf.h>
  32   37  #include <priv_utils.h>
  33   38  #include <netdb.h>
  34   39  #include <signal.h>
↓ open down ↓ 769 lines elided ↑ open up ↑
 804  809                                  nhdl->nh_debug = B_TRUE;
 805  810                                  break;
 806  811                          case 'f':
 807  812                                  run_fg = B_TRUE;
 808  813                                  break;
 809  814                          case 'R':
 810  815                                  nhdl->nh_rootdir = strdup(optarg);
 811  816                                  break;
 812  817                          default:
 813  818                                  free(nhdl);
 814      -                                return (usage(nhdl->nh_pname));
      819 +                                return (usage(argv[0]));
 815  820                          }
 816  821                  }
 817  822          }
 818  823  
 819  824          /*
 820  825           * Set up a signal handler for SIGTERM (and SIGINT if we'll
 821  826           * be running in the foreground) to ensure sure we get a chance to exit
 822  827           * in an orderly fashion.  We also catch SIGHUP, which will be sent to
 823  828           * us by SMF if the service is refreshed.
 824  829           */
↓ open down ↓ 82 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX