[PATCH] msiexec: Improve RegQueryValueExW() calls a bit.

Alexandre Julliard julliard at winehq.org
Tue Dec 3 02:49:04 CST 2019


Serge Gautherie <winehq-git_serge_180711 at gautherie.fr> writes:

> Signed-off-by: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
> ---
>  programs/msiexec/msiexec.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c
> index 17d4bf8..dd83dac 100644
> --- a/programs/msiexec/msiexec.c
> +++ b/programs/msiexec/msiexec.c
> @@ -573,14 +573,14 @@ static BOOL process_args_from_reg( const WCHAR *ident, int *pargc, WCHAR ***parg
>  {
>  	LONG r;
>  	HKEY hkey;
> -	DWORD sz = 0, type = 0;
> +    DWORD sz, type;
>  	WCHAR *buf;
>  	BOOL ret = FALSE;
>  
>  	r = RegOpenKeyW(HKEY_LOCAL_MACHINE, InstallRunOnce, &hkey);
>  	if(r != ERROR_SUCCESS)
>  		return FALSE;
> -	r = RegQueryValueExW(hkey, ident, 0, &type, 0, &sz);
> +    r = RegQueryValueExW(hkey, ident, NULL, &type, NULL, &sz);

The indentation is messed up.  Also please try to write better commit
messages, "improve a bit" doesn't tell us anything.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list