iscontrol(8): Use offsetof().
authorSascha Wildner <saw@online.de>
Sat, 22 Feb 2014 17:34:04 +0000 (18:34 +0100)
committerSascha Wildner <saw@online.de>
Sat, 22 Feb 2014 17:34:15 +0000 (18:34 +0100)
sbin/iscontrol/config.c

index dd5c008..520f1a4 100644 (file)
@@ -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[] = {