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/libumem/umem.c
          +++ new/usr/src/cmd/mdb/common/modules/libumem/umem.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 2012 Joyent, Inc.  All rights reserved.
       27 + * Copyright (c) 2018, Joyent, Inc.
  28   28   * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
  29   29   */
  30   30  
  31   31  #include "umem.h"
  32   32  
  33   33  #include <sys/vmem_impl_user.h>
  34   34  #include <umem_impl.h>
  35   35  
  36   36  #include <alloca.h>
  37   37  #include <limits.h>
↓ open down ↓ 2071 lines elided ↑ open up ↑
2109 2109                  if ((mdb_whatis_flags(w) & WHATIS_QUIET) &&
2110 2110                      ((mdb_whatis_flags(w) & WHATIS_BUFCTL) != 0 ||
2111 2111                      (vs->vs_type == VMEM_ALLOC && vs->vs_depth != 0))) {
2112 2112                          mdb_printf("vmem_seg %p ", addr);
2113 2113                  }
2114 2114  
2115 2115                  mdb_printf("%s from %s vmem arena",
2116 2116                      (vs->vs_type == VMEM_ALLOC) ? "allocated" : "freed",
2117 2117                      wi->wi_vmem->vm_name);
2118 2118  
2119      -                if (!mdb_whatis_flags(w) & WHATIS_QUIET)
     2119 +                if (!(mdb_whatis_flags(w) & WHATIS_QUIET))
2120 2120                          whatis_call_printer(vmem_seg, addr);
2121 2121                  else
2122 2122                          mdb_printf("\n");
2123 2123          }
2124 2124  
2125 2125          return (WHATIS_WALKRET(w));
2126 2126  }
2127 2127  
2128 2128  static int
2129 2129  whatis_walk_vmem(uintptr_t addr, const vmem_t *vmem, whatis_info_t *wi)
↓ open down ↓ 2221 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX