Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/avs/ns/sv/sv.c
          +++ new/usr/src/uts/common/avs/ns/sv/sv.c
↓ open down ↓ 66 lines elided ↑ open up ↑
  67   67  #include <sys/uio.h>
  68   68  #ifndef DS_DDICT
  69   69  #include <sys/pathname.h>
  70   70  #endif
  71   71  #include <sys/aio_req.h>
  72   72  #include <sys/dkio.h>
  73   73  #include <sys/vtoc.h>
  74   74  #include <sys/cmn_err.h>
  75   75  #include <sys/modctl.h>
  76   76  #include <sys/ddi.h>
       77 +#include <sys/sysmacros.h>
  77   78  #include <sys/sunddi.h>
  78   79  #include <sys/sunldi.h>
  79   80  #include <sys/nsctl/nsvers.h>
  80   81  
  81   82  #include <sys/nsc_thread.h>
  82   83  #include <sys/unistat/spcs_s.h>
  83   84  #include <sys/unistat/spcs_s_k.h>
  84   85  #include <sys/unistat/spcs_errors.h>
  85   86  
  86   87  #ifdef DS_DDICT
↓ open down ↓ 2321 lines elided ↑ open up ↑
2408 2409                                      nlive, nst_nthread(sv_tset));
2409 2410                          }
2410 2411  
2411 2412                          sv_max_nlive = nlive;
2412 2413                  }
2413 2414          }
2414 2415  
2415 2416          return (0);
2416 2417  }
2417 2418  
2418      -
2419      -#ifndef offsetof
2420      -#define offsetof(s, m)  ((size_t)(&((s *)0)->m))
2421      -#endif
2422      -
2423 2419  /*
2424 2420   * re-write the size of the current partition
2425 2421   */
2426 2422  static int
2427 2423  sv_fix_dkiocgvtoc(const intptr_t arg, const int mode, sv_dev_t *svp)
2428 2424  {
2429 2425          size_t offset;
2430 2426          int ilp32;
2431 2427          int pnum;
2432 2428          int rc;
↓ open down ↓ 388 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX