[02/13] kernel32: Avoid checking the output parameter for GetNumberOfConsoleInputEvents.

Alexandre Julliard julliard at winehq.org
Mon Jan 3 08:12:02 CST 2011


Andrew Nguyen <anguyen at codeweavers.com> writes:

> @@ -991,9 +991,7 @@ BOOL WINAPI GetNumberOfConsoleInputEvents( HANDLE handle, LPDWORD nrofevents )
>          req->handle = console_handle_unmap(handle);
>          req->flush  = FALSE;
>          if ((ret = !wine_server_call_err( req )))
> -        {
> -            if (nrofevents) *nrofevents = reply->read;
> -        }
> +            *nrofevents = reply->read;

That sort of change is in general not a good idea. Most of these
functions have an exception handler on Windows so NULL pointers get
caught. Even if the handler has been removed in Win7, that doesn't mean
there aren't apps that depend on it.

-- 
Alexandre Julliard
julliard at winehq.org




More information about the wine-devel mailing list