gdi32: Fix the type of a few return values.

Michael Stefaniuc mstefani at redhat.com
Thu Aug 6 04:52:48 CDT 2009


Hello Andrew,

Andrew Nguyen wrote:
> It does not make sense to return a boolean for a pointer type.
> diff --git a/dlls/gdi32/opengl.c b/dlls/gdi32/opengl.c
> index 022fc2c..204fc2b 100644
> --- a/dlls/gdi32/opengl.c
> +++ b/dlls/gdi32/opengl.c
> @@ -168,7 +168,7 @@ static HDC WINAPI wglGetPbufferDCARB(void *pbuffer)
> 
>      TRACE("(%p)\n", pbuffer);
> 
> -    if (!dc) return FALSE;
> +    if (!dc) return 0;
> 
>      /* The display driver has to do the rest of the work because
>       * we need access to lowlevel datatypes which we can't access here
> @@ -338,7 +338,7 @@ PROC WINAPI wglGetProcAddress(LPCSTR func)
> 
>      /* Retrieve the global hDC to get access to the driver.  */
>      dc = OPENGL_GetDefaultDC();
> -    if (!dc) return FALSE;
> +    if (!dc) return NULL;
> 
>      if (!dc->funcs->pwglGetProcAddress) FIXME(" :stub\n");
>      else ret = dc->funcs->pwglGetProcAddress(func);

any reason why you use both "0" and "NULL" to represent a null pointer?
For consistency sake just pick one.

thanks
bye
	michael



More information about the wine-devel mailing list