wbemprox: Implement Win32_OperatingSystem.LocalDateTime. (try 2)

Bruno Jesus 00cpxxx at gmail.com
Thu Jul 11 10:14:03 CDT 2013


On Thu, Jul 11, 2013 at 11:19 AM, Sylvain Petreolle <spetreolle at yahoo.fr> wrote:
> ---
>  dlls/wbemprox/builtin.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
> index 9e2369a..5b7674e 100644
> --- a/dlls/wbemprox/builtin.c
> +++ b/dlls/wbemprox/builtin.c

> @@ -1774,6 +1778,31 @@ static WCHAR *get_lastbootuptime(void)
> +
> +    GetLocalTime(&st);
> +    Status = GetTimeZoneInformation(&tzi);
> +
> +    if(Status == TIME_ZONE_ID_INVALID) return NULL;

Aren't you leaking ret here? Maybe you could swap this check with the
memory allocation.

> +    sprintfW( ret, fmtW, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, st.wMilliseconds * 1000, -Bias);

Is it ok for the + sign to the fixed in the format?

Best wishes,
Bruno



More information about the wine-devel mailing list