From a738157be0ea0c08564aadf6f59df5f3702ce8ce Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 16 Mar 2018 23:15:24 +0000 Subject: code maintenance: incorporate use of the __offsetof convenience macro. --- src/internal/ntapi_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/internal') 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 -- cgit v1.2.3