summaryrefslogtreecommitdiffhomepage
path: root/src/internal
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-03-16 23:15:24 +0000
committermidipix <writeonce@midipix.org>2018-03-20 23:27:57 -0400
commita738157be0ea0c08564aadf6f59df5f3702ce8ce (patch)
tree04b9b83f616397e4cd49610142c92976f8453006 /src/internal
parent12d3bfc13a7b31e68b54619b526817d92b033a27 (diff)
downloadntapi-a738157be0ea0c08564aadf6f59df5f3702ce8ce.tar.bz2
ntapi-a738157be0ea0c08564aadf6f59df5f3702ce8ce.tar.xz
code maintenance: incorporate use of the __offsetof convenience macro.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/ntapi_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/ntapi_impl.h b/src/internal/ntapi_impl.h
index 4c26f55..791dbc1 100644
--- a/src/internal/ntapi_impl.h
+++ b/src/internal/ntapi_impl.h
@@ -145,7 +145,7 @@ int32_t __ntapi_tt_open_dir_utf8(void ** hfile, void * hat, const char * arg, in
int __ntapi_ipc_page_alloc(struct dalist_ex * dlist, void ** addr, size_t * alloc_size);
/* debug */
-#define __ntidx(x) (&(((ntapi_vtbl *)0)->x)) / sizeof(size_t)
+#define __ntidx(x) __offsetof(ntapi_vtbl,x) / sizeof(size_t)
#endif