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

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Alexandre Julliard 2019-04-30 20:24:52 +02:00
parent 05fca48ebc
commit 7c0385bdb4
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)