aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-12-17 22:57:55 +0100
committerAnders Broman <a.broman58@gmail.com>2015-12-18 05:49:45 +0000
commite1ed7598ee2cc884d28a05533d9060b56ceb7976 (patch)
tree46d656b34951a7e8e27ffc1708f78c26f2c648c8 /wiretap
parenta0ad55db4247c31b3375f53ab4a8b0ecea473348 (diff)
Removed local definitions of offsetof().
The offsetof() macro is an ANSI C library feature. Change-Id: I2ac91b0b4c94c6f6baf14133b076fdc5ed2e182b Reviewed-on: https://code.wireshark.org/review/12707 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/netscaler.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/wiretap/netscaler.c b/wiretap/netscaler.c
index fe078cc311..97eed67cf4 100644
--- a/wiretap/netscaler.c
+++ b/wiretap/netscaler.c
@@ -491,19 +491,17 @@ typedef struct nspr_pktracepart_v26
} nspr_pktracepart_v26_t;
#define nspr_pktracepart_v26_s ((guint32)(sizeof(nspr_pktracepart_v26_t)))
-#define myoffsetof(type,fieldname) (&(((type*)0)->fieldname))
-
#define __TNDO(phdr,enumprefix,structname,hdrname)\
static const guint8 enumprefix##_##hdrname##_offset = (guint8)sizeof(nspr_##structname##_t);
#define __TNO(phdr,enumprefix,structprefix,structname,hdrname,structfieldname) \
- static const guint8 enumprefix##_##hdrname##_offset = (guint8)GPOINTER_TO_INT(myoffsetof(nspr_##structname##_t,structprefix##_##structfieldname));
+ static const guint8 enumprefix##_##hdrname##_offset = (guint8)GPOINTER_TO_INT(offsetof(nspr_##structname##_t,structprefix##_##structfieldname));
#define __TNL(phdr,enumprefix,structprefix,structname,hdrname,structfieldname) \
static const guint8 enumprefix##_##hdrname##_len = (guint8)sizeof(((nspr_##structname##_t*)0)->structprefix##_##structfieldname);
#define __TNV1O(phdr,enumprefix,structprefix,structname,hdrname,structfieldname) \
- static const guint8 enumprefix##_##hdrname##_offset = (guint8)GPOINTER_TO_INT(myoffsetof(nspr_##structname##_t,structfieldname));
+ static const guint8 enumprefix##_##hdrname##_offset = (guint8)GPOINTER_TO_INT(offsetof(nspr_##structname##_t,structfieldname));
#define __TNV1L(phdr,enumprefix,structprefix,structname,hdrname,structfieldname) \
static const guint8 enumprefix##_##hdrname##_len = (guint8)sizeof(((nspr_##structname##_t*)0)->structfieldname);