Michael Stefaniuc : include: Use offsetof() instead of open coding it.
Alexandre Julliard
julliard at winehq.org
Wed Mar 22 15:52:34 CDT 2017
Module: wine
Branch: master
Commit: fd578822dd5dd5b1a28264cc57681512304252c7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd578822dd5dd5b1a28264cc57681512304252c7
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Tue Mar 21 22:57:37 2017 +0100
include: Use offsetof() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/wintrust.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/wintrust.h b/include/wintrust.h
index 5da3720..20fb296 100644
--- a/include/wintrust.h
+++ b/include/wintrust.h
@@ -429,7 +429,7 @@ typedef struct _CRYPT_PROVUI_FUNCS {
#include <poppack.h>
-#define WVT_OFFSETOF(t,f) ((ULONG)((ULONG_PTR)(&((t*)0)->f)))
+#define WVT_OFFSETOF(t,f) ((ULONG)(offsetof(t, f)))
#define WVT_ISINSTRUCT(t,s,f) (WVT_OFFSETOF(t,f) + sizeof(((t*)0)->f) <= (s))
#define WVT_IS_CBSTRUCT_GT_MEMBEROFFSET(t,s,f) WVT_ISINSTRUCT(t,s,f)
More information about the wine-cvs
mailing list