Sebastian Lackner : user.exe16: Don't open code CONTAINING_RECORD.
Alexandre Julliard
julliard at winehq.org
Mon Feb 19 13:52:03 CST 2018
Module: wine
Branch: master
Commit: 538263d0efe725124df88ce1cce124bc3ad7e2af
URL: https://source.winehq.org/git/wine.git/?a=commit;h=538263d0efe725124df88ce1cce124bc3ad7e2af
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Mon Feb 19 20:56:02 2018 +0300
user.exe16: Don't open code CONTAINING_RECORD.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user.exe16/user.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/dlls/user.exe16/user.c b/dlls/user.exe16/user.c
index f7d4109..27b9279 100644
--- a/dlls/user.exe16/user.c
+++ b/dlls/user.exe16/user.c
@@ -87,10 +87,7 @@ static BOOL CALLBACK gray_string_callback( HDC hdc, LPARAM param, INT len )
/* callback for 16-bit gray string proc with string pointer */
static BOOL CALLBACK gray_string_callback_ptr( HDC hdc, LPARAM param, INT len )
{
- const struct gray_string_info *info;
- char *str = (char *)param;
-
- info = (struct gray_string_info *)(str - offsetof( struct gray_string_info, str ));
+ const struct gray_string_info *info = CONTAINING_RECORD( (void *)param, struct gray_string_info, str );
return gray_string_callback( hdc, (LPARAM)info, len );
}
More information about the wine-cvs
mailing list