summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/kit/file.c4
-rw-r--r--source/kit/secure_random.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/kit/file.c b/source/kit/file.c
index 6a7f740..4893823 100644
--- a/source/kit/file.c
+++ b/source/kit/file.c
@@ -371,8 +371,8 @@ kit_file_info_t kit_file_info(kit_str_t path) {
if (f != INVALID_HANDLE_VALUE) {
FILETIME ft;
if (GetFileTime(f, NULL, NULL, &ft) != 0) {
- ui64 nsec100 = (((ui64) ft.dwHighDateTime) << 32) |
- (ui64) ft.dwLowDateTime;
+ i64 nsec100 = (((i64) ft.dwHighDateTime) << 32) |
+ (i64) ft.dwLowDateTime;
result.time_modified_sec = (i64) (nsec100 / 10000000);
result.time_modified_nsec = (i32) (100 * (nsec100 % 10000000));
} else {
diff --git a/source/kit/secure_random.c b/source/kit/secure_random.c
index 56b46d7..8f7a302 100644
--- a/source/kit/secure_random.c
+++ b/source/kit/secure_random.c
@@ -22,7 +22,7 @@ void kit_secure_random(i64 size, void *data) {
return;
#if defined(_WIN32) && !defined(__CYGWIN__)
- HCRYPTPROV prov = NULL;
+ HCRYPTPROV prov = 0;
if (!CryptAcquireContextW(&prov, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT | CRYPT_SILENT) ||
!CryptGenRandom(prov, (DWORD) size, (BYTE *) data) ||