diff options
-rw-r--r-- | otherlibs/unix/times_win32.c | 5 | ||||
-rw-r--r-- | runtime/win32.c | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/otherlibs/unix/times_win32.c b/otherlibs/unix/times_win32.c index 81312a5970..37fdef9d09 100644 --- a/otherlibs/unix/times_win32.c +++ b/otherlibs/unix/times_win32.c @@ -20,10 +20,7 @@ static double to_sec(FILETIME ft) { - ULARGE_INTEGER tmp; - - tmp.u.LowPart = ft.dwLowDateTime; - tmp.u.HighPart = ft.dwHighDateTime; + ULARGE_INTEGER tmp = {{ft.dwLowDateTime, ft.dwHighDateTime}}; /* convert to seconds: GetProcessTimes returns number of 100-nanosecond intervals */ diff --git a/runtime/win32.c b/runtime/win32.c index fc254bf174..fe4ef172db 100644 --- a/runtime/win32.c +++ b/runtime/win32.c @@ -1081,11 +1081,11 @@ CAMLexport clock_t caml_win32_clock(void) return (clock_t)(-1); } - tmp.u.LowPart = stime.dwLowDateTime; - tmp.u.HighPart = stime.dwHighDateTime; + tmp.LowPart = stime.dwLowDateTime; + tmp.HighPart = stime.dwHighDateTime; total = tmp.QuadPart; - tmp.u.LowPart = utime.dwLowDateTime; - tmp.u.HighPart = utime.dwHighDateTime; + tmp.LowPart = utime.dwLowDateTime; + tmp.HighPart = utime.dwHighDateTime; total += tmp.QuadPart; /* total in 100-nanosecond intervals (1e7 / CLOCKS_PER_SEC) */ |