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

List:       wine-devel
Subject:    Re: [PATCH 1/2] localspl: Clear LastError on success in AddMonitor
From:       Huw Davies <huw () codeweavers ! com>
Date:       2017-01-31 10:50:53
Message-ID: 20170131105053.GC30411 () merlot ! physics ! ox ! ac ! uk
[Download RAW message or body]

On Mon, Jan 30, 2017 at 07:43:34PM +0100, Detlef Riekenberg wrote:
>  dlls/localspl/provider.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/dlls/localspl/provider.c b/dlls/localspl/provider.c
> index f359b73..f370b9f 100644
> --- a/dlls/localspl/provider.c
> +++ b/dlls/localspl/provider.c
> @@ -1541,6 +1541,9 @@ static BOOL WINAPI fpAddMonitor(LPWSTR pName, DWORD Level, LPBYTE pMonitors)
>          RegCloseKey(hentry);
>      }
>  
> +    if (res)
> +        SetLastError(ERROR_SUCCESS); /* Monitor installer depend on this */
> +
>      RegCloseKey(hroot);
>      return (res);
>  }

I think unconditionally resetting the error after monitor_unload()
would be cleaner.

Huw.



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

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