From 6aefd01e619ba10a78b094659673e8ba5bef338f Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Tue, 12 Sep 2023 07:20:45 +0200 Subject: kit_test: signals --- source/kit/file.c | 4 ++-- source/kit/secure_random.c | 2 +- 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) || -- cgit v1.2.3