Print this page
2976 remove useless offsetof() macros
@@ -27,10 +27,11 @@
#include <sys/dklabel.h>
#include <sys/dktp/fdisk.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <stddef.h>
#include <unistd.h>
#include <strings.h>
#include <errno.h>
#include <limits.h>
@@ -145,13 +146,10 @@
/*
* Introduce an index into the list to speed up insert_into looking for the
* right position in the list. This index is an AVL tree of all the
* iodev_snapshot in the list.
*/
-
-#define offsetof(s, m) (size_t)(&(((s *)0)->m)) /* for avl_create */
-
static int
avl_iodev_cmp(const void* is1, const void* is2)
{
int c = iodev_cmp((struct iodev_snapshot *)is1,
(struct iodev_snapshot *)is2);