ntdll: Check for time conversion error to silence a compiler warning.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7c0385bdb4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Alexandre Julliard 2019-04-30 20:24:52 +02:00 committed by Michael Stefaniuc
parent 551cba7c31
commit 963ec4699f
1 changed files with 2 additions and 3 deletions

View File

@ -1006,9 +1006,8 @@ NTSTATUS WINAPI NtSetSystemTime(const LARGE_INTEGER *NewTime, LARGE_INTEGER *Old
if (!OldTime) OldTime = &tm;
NtQuerySystemTime( OldTime );
RtlTimeToSecondsSince1970( OldTime, &oldsec );
RtlTimeToSecondsSince1970( NewTime, &sec );
if (!RtlTimeToSecondsSince1970( OldTime, &oldsec )) return STATUS_INVALID_PARAMETER;
if (!RtlTimeToSecondsSince1970( NewTime, &sec )) return STATUS_INVALID_PARAMETER;
/* fake success if time didn't change */
if (oldsec == sec)