Andrew Nguyen : msvcrt: Use the write_invalid_msvcrt_tm helper in _gmtime64_s.

Alexandre Julliard julliard at winehq.org
Mon Oct 11 13:15:16 CDT 2010


Module: wine
Branch: master
Commit: 90771ab6054ccdfca65de1e12dd7c03205a1d151
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=90771ab6054ccdfca65de1e12dd7c03205a1d151

Author: Andrew Nguyen <anguyen at codeweavers.com>
Date:   Mon Oct 11 05:24:30 2010 -0500

msvcrt: Use the write_invalid_msvcrt_tm helper in _gmtime64_s.

---

 dlls/msvcrt/time.c |   14 +++-----------
 1 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c
index d0201e2..ae2463c 100644
--- a/dlls/msvcrt/time.c
+++ b/dlls/msvcrt/time.c
@@ -284,17 +284,9 @@ int CDECL MSVCRT__gmtime64_s(struct MSVCRT_tm *res, const MSVCRT___time64_t *sec
     SYSTEMTIME st;
     ULONGLONG time;
 
-    if(!res || !secs || *secs<0) {
-        if(res) {
-            res->tm_sec = -1;
-            res->tm_min = -1;
-            res->tm_hour = -1;
-            res->tm_mday = -1;
-            res->tm_year = -1;
-            res->tm_mon = -1;
-            res->tm_wday = -1;
-            res->tm_yday = -1;
-            res->tm_isdst = -1;
+    if (!res || !secs || *secs < 0) {
+        if (res) {
+            write_invalid_msvcrt_tm(res);
         }
 
         *MSVCRT__errno() = MSVCRT_EINVAL;




More information about the wine-cvs mailing list