jscript: Use CONTAINING_RECORD() to get from a field to a struct.

Michael Stefaniuc mstefani at redhat.de
Mon Sep 19 03:14:47 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/jscript/vbarray.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/jscript/vbarray.c b/dlls/jscript/vbarray.c
index 7b9993b..f374fb0 100644
--- a/dlls/jscript/vbarray.c
+++ b/dlls/jscript/vbarray.c
@@ -36,7 +36,7 @@ static const WCHAR uboundW[] = {'u','b','o','u','n','d',0};
 
 static inline VBArrayInstance *vbarray_from_vdisp(vdisp_t *vdisp)
 {
-    return (VBArrayInstance*)vdisp->u.jsdisp;
+    return CONTAINING_RECORD(vdisp->u.jsdisp, VBArrayInstance, dispex);
 }
 
 static inline VBArrayInstance *vbarray_this(vdisp_t *jsthis)
-- 
2.7.4



More information about the wine-patches mailing list