Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/modules/ii/ii.c
          +++ new/usr/src/cmd/mdb/common/modules/ii/ii.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 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
       26 +#include <stddef.h>
       27 +
  26   28  #include <sys/types.h>
  27   29  #include <sys/mdb_modapi.h>
  28   30  
  29   31  #include <sys/nsctl/nsctl.h>
  30   32  #include <sys/unistat/spcs_s.h>
  31   33  #include <sys/unistat/spcs_s_k.h>
  32   34  
  33   35  
  34   36  #include <sys/nsctl/dsw.h>
  35   37  #include <sys/nsctl/dsw_dev.h>
  36   38  
  37   39  #include <sys/nsctl/nsvers.h>
  38   40  
  39      -#define offsetof(s, m)  ((size_t)(&((s *)0)->m))
  40      -
  41   41  
  42   42  const mdb_bitmask_t bi_flags_bits[] = {
  43   43          { "DSW_GOLDEN", DSW_GOLDEN, DSW_GOLDEN },
  44   44          { "DSW_COPYINGP", DSW_COPYINGP, DSW_COPYINGP },
  45   45          { "DSW_COPYINGM", DSW_COPYINGM, DSW_COPYINGM },
  46   46          { "DSW_COPYINGS", DSW_COPYINGS, DSW_COPYINGS },
  47   47          { "DSW_COPYINGX", DSW_COPYINGX, DSW_COPYINGX },
  48   48          { "DSW_BMPOFFLINE", DSW_BMPOFFLINE, DSW_BMPOFFLINE },
  49   49          { "DSW_SHDOFFLINE", DSW_SHDOFFLINE, DSW_SHDOFFLINE },
  50   50          { "DSW_MSTOFFLINE", DSW_MSTOFFLINE, DSW_MSTOFFLINE },
↓ open down ↓ 377 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX