[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: shell32: Use boolean return value in boolean function
From:       Michael Stefaniuc <mstefani () redhat ! com>
Date:       2014-01-28 9:31:17
Message-ID: 52E778E5.5080700 () redhat ! com
[Download RAW message or body]

On 01/28/2014 12:07 AM, André Hentschel wrote:
> ---
>  dlls/shell32/shellstring.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dlls/shell32/shellstring.c b/dlls/shell32/shellstring.c
> index 6b511d2..9eb8536 100644
> --- a/dlls/shell32/shellstring.c
> +++ b/dlls/shell32/shellstring.c
> @@ -183,7 +183,7 @@ static BOOL StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr)
>  	if (lstrcpynW (lpWide, lpStrW, nWide))
>  	{ return lstrlenW (lpWide);
>  	}
> -	return 0;
> +	return FALSE;
This looks ugly. StrToOleStrNW() as well as StrToOleStrNA() return
string length and not BOOL.

What StrToOleStrN() (the sole user of about two functions) should return
is not documented nor is there a Wine test for it.

>  }
>  
>  BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr)

bye
	michael



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic