From: Sascha Wildner Date: Sat, 22 Feb 2014 17:34:04 +0000 (+0100) Subject: iscontrol(8): Use offsetof(). X-Git-Tag: v3.9.0~490 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/339decda94732951e5ac09cea049d08596be51ea iscontrol(8): Use offsetof(). --- diff --git a/sbin/iscontrol/config.c b/sbin/iscontrol/config.c index dd5c0083c5..520f1a4044 100644 --- a/sbin/iscontrol/config.c +++ b/sbin/iscontrol/config.c @@ -91,7 +91,7 @@ #define OPT_iqn 34 #define OPT_sockbufsize 35 -#define _OFF(v) ((int)&((isc_opt_t *)NULL)->v) +#define _OFF(v) (offsetof(isc_opt_t *), (v)) #define _E(u, s, v) {.usage=u, .scope=s, .name=#v, .tokenID=OPT_##v} textkey_t keyMap[] = {