Jacek Caban : oleaut32: SysStringByteLen code clean up.
Module: wine Branch: master Commit: ab509cde5e188c9af19bedd04f653f065d6fa5c9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ab509cde5e188c9af19bedd04f... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 1 15:06:44 2012 +0200 oleaut32: SysStringByteLen code clean up. --- dlls/oleaut32/oleaut.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 0d4a07c..bb3bac6 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -171,18 +171,7 @@ UINT WINAPI SysStringLen(BSTR str) */ UINT WINAPI SysStringByteLen(BSTR str) { - DWORD* bufferPointer; - - if (!str) return 0; - /* - * The length of the string (in bytes) is contained in a DWORD placed - * just before the BSTR pointer - */ - bufferPointer = (DWORD*)str; - - bufferPointer--; - - return (int)(*bufferPointer); + return str ? *((DWORD*)str-1) : 0; } /******************************************************************************
participants (1)
-
Alexandre Julliard