summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-12 07:20:45 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-12 07:20:45 +0200
commit6aefd01e619ba10a78b094659673e8ba5bef338f (patch)
tree49c45662bc8ef496dd9f56cd1fc7124480591005 /source
parentb5f549cc9f984a4af363ef41696815a789ce3d13 (diff)
downloadkit-6aefd01e619ba10a78b094659673e8ba5bef338f.zip
kit_test: signals
Diffstat (limited to 'source')
-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) ||