wininet: InternetGetConnectedStateExW must return TRUE for success
Michael Stefaniuc
mstefani at redhat.com
Wed Jan 29 03:48:06 CST 2014
Bruno,
On 01/29/2014 02:27 AM, Bruno Jesus wrote:
> Citavi relies on == TRUE comparison so return TRUE instead of != FALSE
>
> Fixes bug 17796
>
> See http://bugs.winehq.org/show_bug.cgi?id=17796#c6 for AF analysis.
>
>
> connect.txt
>
>
> diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c
> index a49026c..e0f8f1b 100644
> --- a/dlls/wininet/internet.c
> +++ b/dlls/wininet/internet.c
> @@ -1219,7 +1219,7 @@ BOOL WINAPI InternetGetConnectedStateExW(LPDWORD lpdwStatus, LPWSTR lpszConnecti
> WARN("always returning LAN connection.\n");
> *lpdwStatus = INTERNET_CONNECTION_LAN;
> }
> - return LoadStringW(WININET_hModule, IDS_LANCONNECTION, lpszConnectionName, dwNameLen);
> + return LoadStringW(WININET_hModule, IDS_LANCONNECTION, lpszConnectionName, dwNameLen) ? TRUE : FALSE;
we're getting rid of "? TRUE : FALSE" constructs in Wine as those are
ugly and confusing.
In this case a "return LoadStringW() != 0;" or even "> 0" is better as
LoadString returns 0 on failure and a string length on success.
bye
michael
More information about the wine-devel
mailing list