diff options
author | midipix <writeonce@midipix.org> | 2018-03-16 23:15:24 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-03-20 23:27:57 -0400 |
commit | a738157be0ea0c08564aadf6f59df5f3702ce8ce (patch) | |
tree | 04b9b83f616397e4cd49610142c92976f8453006 /src/internal | |
parent | 12d3bfc13a7b31e68b54619b526817d92b033a27 (diff) | |
download | ntapi-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.h | 2 |
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 |