[PATCH] shldocvw: Fixed typo = vs == (Coverity)

Eric Pouech eric.pouech at orange.fr
Fri Feb 25 14:30:21 CST 2011


Le 25/02/2011 14:16, Marcus Meissner a écrit :
> CID1801
> ---
>   dlls/shdocvw/shlinstobj.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dlls/shdocvw/shlinstobj.c b/dlls/shdocvw/shlinstobj.c
> index d272c91..067e678 100644
> --- a/dlls/shdocvw/shlinstobj.c
> +++ b/dlls/shdocvw/shlinstobj.c
> @@ -376,7 +376,7 @@ HRESULT SHDOCVW_GetShellInstanceObjectClassObject(REFCLSID rclsid, REFIID riid,
>
>       /* Figure if there is an 'Instance' subkey for the given CLSID and acquire a handle. */
>       if (!StringFromGUID2(rclsid, wszInstanceKey + 6, CHARS_IN_GUID) ||
> -        !(wszInstanceKey[5+CHARS_IN_GUID]='\\') || /* Repair the null-termination. */
> +        !(wszInstanceKey[5+CHARS_IN_GUID] == '\\') || /* Repair the null-termination. */
>           ERROR_SUCCESS != RegOpenKeyExW(HKEY_CLASSES_ROOT, wszInstanceKey, 0, KEY_READ,&hInstanceKey))
>       {
>           /* If there is no 'Instance' subkey, then it's not a Shell Instance Object. */
are you sure about the fix ?
it looks like it's intentional that the test always succeed (it just 
replaces the null termination char written in StringFromGUID2 with a '\\')
(and this would explain the comment as well ;-)
I'm not familiar with the code... just being suspicious

A+

-- 
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)




More information about the wine-patches mailing list