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/fm/modules/common/ext-event-transport/fmevt_outbound.c
          +++ new/usr/src/cmd/fm/modules/common/ext-event-transport/fmevt_outbound.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) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   */
  25   25  
       26 +/*
       27 + * Copyright 2019 Joyent, Inc.
       28 + */
       29 +
  26   30  #include <sys/types.h>
  27   31  #include <strings.h>
  28   32  #include <fm/fmd_api.h>
  29   33  #include <sys/fm/protocol.h>
  30   34  #include <sys/fm/util.h>
  31   35  #include <sys/sysevent.h>
  32   36  
  33   37  #include "fmevt.h"
  34   38  
  35   39  static evchan_t *fmevt_outbound_chan;
↓ open down ↓ 69 lines elided ↑ open up ↑
 105  109  
 106  110          /*
 107  111           * Allow simulation environment to change outbound channel name.
 108  112           */
 109  113          channel_name = fmd_prop_get_string(hdl, "outbound_channel");
 110  114  
 111  115          if (sysevent_evc_bind(channel_name, &fmevt_outbound_chan,
 112  116              EVCH_CREAT | EVCH_HOLD_PEND_INDEF) != 0) {
 113  117                  fmd_hdl_abort(hdl, "Unable to bind channel %s",
 114  118                      channel_name);
 115      -                return;
 116  119          }
 117  120  
 118  121          channel_depth = fmd_prop_get_int32(hdl, "outbound_channel_depth");
 119  122  
 120  123          if (sysevent_evc_control(fmevt_outbound_chan, EVCH_SET_CHAN_LEN,
 121  124              (uint32_t)channel_depth) != 0) {
 122  125                  fmd_hdl_abort(hdl, "Unable to set depth of channel %s to %d",
 123  126                      channel_name, channel_depth);
 124  127          }
 125  128          fmd_prop_free_string(hdl, channel_name);
↓ open down ↓ 18 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX