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/crypto/spi.c
          +++ new/usr/src/cmd/mdb/common/modules/crypto/spi.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  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   26  /*
       27 + * Copyright (c) 2018, Joyent, Inc.
       28 + */
       29 +
       30 +/*
  27   31   * mdb dcmds for selected structures from
  28   32   * usr/src/uts/common/sys/crypto/spi.h
  29   33   *
  30   34   * Also the mdb module housekeeping
  31   35   */
  32   36  
  33   37  #include <sys/mdb_modapi.h>
  34   38  #include <sys/modctl.h>
  35   39  #include <sys/crypto/api.h>
  36   40  #include <sys/crypto/common.h>
↓ open down ↓ 147 lines elided ↑ open up ↑
 184  188  };
 185  189  
 186  190  /*ARGSUSED*/
 187  191  int
 188  192  crypto_mech_info(uintptr_t addr, uint_t flags, int argc,
 189  193      const mdb_arg_t *argv)
 190  194  {
 191  195          crypto_mech_info_t minfo;
 192  196          const char *unit = "bits";
 193  197  
 194      -        if (! flags & DCMD_ADDRSPEC)
      198 +        if (!(flags & DCMD_ADDRSPEC))
 195  199                  return (DCMD_USAGE);
 196  200  
 197  201          if (mdb_vread(&minfo, sizeof (crypto_mech_info_t), addr)
 198  202              == -1) {
 199  203                  mdb_warn("cannot read addr %p", addr);
 200  204                  return (DCMD_ERR);
 201  205          }
 202  206          mdb_printf("cm_mech_name_t\t%s\n", minfo.cm_mech_name);
 203  207          mdb_printf("cm_mech_number\t%lld\n", minfo.cm_mech_number);
 204  208          mdb_printf("cm_func_group_mask\t0x%x:\t<%b>\n",
↓ open down ↓ 107 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX