libwinpr-sysinfo: fix warning

This commit is contained in:
Marc-André Moreau 2012-09-06 13:22:31 -04:00
parent e5b5b09c38
commit 4910d696f8
2 changed files with 3 additions and 1 deletions

View File

@ -176,7 +176,7 @@ wchar_t* xwcsdup(const wchar_t* wstr)
#elif sun
mem = wsdup(wstr);
#elif (defined(__APPLE__) && defined(__MACH__)) || defined(ANDROID)
mem = xmalloc(wcslen(wstr));
mem = xmalloc(wcslen(wstr) * sizeof(wchar_t));
if (mem != NULL)
wcscpy(mem, wstr);
#else

View File

@ -161,6 +161,8 @@ VOID GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime)
{
ULARGE_INTEGER time64;
time64.u.HighPart = 0;
/* time represented in tenths of microseconds since midnight of January 1, 1601 */
time64.QuadPart = time(NULL) + 11644473600LL; /* Seconds since January 1, 1601 */