Print this page
2976 remove useless offsetof() macros

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/fmadm/common/faulty.c
          +++ new/usr/src/cmd/fm/fmadm/common/faulty.c
↓ open down ↓ 37 lines elided ↑ open up ↑
  38   38  #include <fm/fmd_adm.h>
  39   39  #include <fm/fmd_msg.h>
  40   40  #include <dlfcn.h>
  41   41  #include <sys/systeminfo.h>
  42   42  #include <sys/utsname.h>
  43   43  #include <libintl.h>
  44   44  #include <locale.h>
  45   45  #include <sys/smbios.h>
  46   46  #include <libdevinfo.h>
  47   47  #include <stdlib.h>
  48      -
  49      -#define offsetof(s, m)  ((size_t)(&(((s*)0)->m)))
       48 +#include <stddef.h>
  50   49  
  51   50  /*
  52   51   * Fault records are added to catalog by calling add_fault_record_to_catalog()
  53   52   * records are stored in order of importance to the system.
  54   53   * If -g flag is set or not_suppressed is not set and the class fru, fault,
  55   54   * type are the same then details are merged into an existing record, with uuid
  56   55   * records are stored in time order.
  57   56   * For each record information is extracted from nvlist and merged into linked
  58   57   * list each is checked for identical records for which percentage certainty are
  59   58   * added together.
↓ open down ↓ 1807 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX