Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/lvm/libmeta/common/meta_statconcise.c
          +++ new/usr/src/lib/lvm/libmeta/common/meta_statconcise.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 2006 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   26  #include <meta.h>
  29   27  #include <assert.h>
  30   28  #include <ctype.h>
  31   29  #include <mdiox.h>
  32   30  #include <meta.h>
  33   31  #include <stdio.h>
  34   32  #include <stdlib.h>
       33 +#include <stddef.h>
  35   34  #include <strings.h>
  36   35  #include <sys/lvm/md_mddb.h>
  37   36  #include <sys/lvm/md_names.h>
  38   37  #include <sys/lvm/md_crc.h>
  39   38  #include <sys/lvm/md_convert.h>
  40   39  
  41   40  
  42   41  /*
  43   42   * Design Notes:
  44   43   *
↓ open down ↓ 109 lines elided ↑ open up ↑
 154  153          struct md_im_rec        *mdrec;
 155  154  } md_im_list_t;
 156  155  
 157  156  
 158  157  /*
 159  158   * MAXSIZEMDRECNAME is the value that has historically been used to allocate
 160  159   * space for the metadevice name
 161  160   */
 162  161  #define MAXSIZEMDRECNAME        20
 163  162  #define NAMEWIDTH               16
 164      -#define offsetof(s, m)  ((size_t)(&(((s *)0)->m)))
 165  163  #define NOT_PHYSICAL_DEV        0
 166  164  #define PHYSICAL_DEV            1
 167  165  
 168  166  
 169  167  /*
 170  168   * strip_blacks()
 171  169   *
 172  170   * Strip blanks from string.  Used for size field in concise output.
 173  171   */
 174  172  static char *
↓ open down ↓ 1718 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX