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

Alexandre Julliard julliard at winehq.org
Tue Apr 30 15:59:56 CDT 2019


Module: wine
Branch: master
Commit: 7c0385bdb49f28472b63b3dab823732fabda6707
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7c0385bdb49f28472b63b3dab823732fabda6707

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 30 20:24:52 2019 +0200

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

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/time.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index a4762fa..443d8b2 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -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)




More information about the wine-cvs mailing list