Print this page
10132 smatch fixes for MDB
Reviewed by: Andy Fiddaman <andy@omniosce.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/modules/fctl/fctl.c
          +++ new/usr/src/cmd/mdb/common/modules/fctl/fctl.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   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
       26 +/*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
  26   29  
  27   30  #include <sys/mdb_modapi.h>
  28   31  #include <sys/mutex.h>
  29   32  #include <sys/modctl.h>
  30   33  #include <time.h>
  31   34  #include <sys/fibre-channel/fc.h>
  32   35  #include <sys/fibre-channel/impl/fctl_private.h>
  33   36  #include <sys/fibre-channel/impl/fc_ulpif.h>
  34   37  #include <sys/fibre-channel/impl/fc_portif.h>
  35   38  #include <sys/fibre-channel/impl/fc_fcaif.h>
↓ open down ↓ 1066 lines elided ↑ open up ↑
1102 1105          if (mdb_getopts(argc, argv,
1103 1106              's', MDB_OPT_UINTPTR, &pktstart,
1104 1107              'e', MDB_OPT_UINTPTR, &pktend) != argc) {
1105 1108                  return (DCMD_USAGE);
1106 1109          }
1107 1110  
1108 1111          if (pktstart > pktend) {
1109 1112                  return (DCMD_USAGE);
1110 1113          }
1111 1114  
1112      -        if (logq.il_flags & FC_TRACE_LOGQ_V2 != 0) {
     1115 +        if ((logq.il_flags & FC_TRACE_LOGQ_V2) != 0) {
1113 1116                  rval = fc_dump_logmsg((fc_trace_dmsg_t *)logq.il_msgh, pktstart,
1114 1117                      pktend, &printed);
1115 1118          } else {
1116 1119                  rval = fc_dump_old_logmsg((fc_trace_dmsgv1_t *)logq.il_msgh,
1117 1120                      pktstart, pktend, &printed);
1118 1121          }
1119 1122  
1120 1123          if (rval != DCMD_OK) {
1121 1124                  return (rval);
1122 1125          }
↓ open down ↓ 232 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX