Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/avs/ns/rdc/rdc.c
          +++ new/usr/src/uts/common/avs/ns/rdc/rdc.c
↓ open down ↓ 25 lines elided ↑ open up ↑
  26   26  #define _RDC_
  27   27  #include <sys/types.h>
  28   28  #include <sys/ksynch.h>
  29   29  #include <sys/kmem.h>
  30   30  #include <sys/errno.h>
  31   31  #include <sys/conf.h>
  32   32  #include <sys/cmn_err.h>
  33   33  #include <sys/modctl.h>
  34   34  #include <sys/cred.h>
  35   35  #include <sys/ddi.h>
       36 +#include <sys/sysmacros.h>
  36   37  #include <sys/unistat/spcs_s.h>
  37   38  #include <sys/unistat/spcs_s_k.h>
  38   39  #include <sys/unistat/spcs_errors.h>
  39   40  
  40   41  #include <sys/nsc_thread.h>
  41   42  #ifdef DS_DDICT
  42   43  #include "../contract.h"
  43   44  #endif
  44   45  #include <sys/nsctl/nsctl.h>
  45   46  #include <sys/nsctl/nsvers.h>
↓ open down ↓ 468 lines elided ↑ open up ↑
 514  515                  args->arg0 = (uint32_t)args32.arg0; /* int */
 515  516                  break;
 516  517  
 517  518          default:
 518  519                  return (EINVAL);
 519  520          }
 520  521  
 521  522          return (0);
 522  523  }
 523  524  
 524      -
 525      -/*
 526      - * Yet another standard thing that is not standard ...
 527      - */
 528      -#ifndef offsetof
 529      -#define offsetof(s, m)  ((size_t)(&((s *)0)->m))
 530      -#endif
 531      -
 532  525  /*
 533  526   * Build a 32bit rdc_set structure and copyout to the user level.
 534  527   */
 535  528  int
 536  529  rdc_status_copy32(const void *arg, void *usetp, size_t size, int mode)
 537  530  {
 538  531          rdc_u_info_t *urdc = (rdc_u_info_t *)arg;
 539  532          struct rdc_set32 set32;
 540  533          size_t tailsize;
 541  534  #ifdef DEBUG
↓ open down ↓ 574 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX