summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-15 22:17:51 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-15 22:17:51 +0200
commitc6a5c3117c736fb89ac85e5ca6d6375c71cd4f20 (patch)
tree208fbbcd3d2d415c655d51eb99d562f761785ca6
parentcdc5ceea3634fd6bdd55156ef0523d927624eb4c (diff)
downloadkit-c6a5c3117c736fb89ac85e5ca6d6375c71cd4f20.zip
win32: fix
-rw-r--r--source/kit/shared_memory.win32.c1
-rw-r--r--source/tests/file.test.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/source/kit/shared_memory.win32.c b/source/kit/shared_memory.win32.c
index 73175b1..34bb276 100644
--- a/source/kit/shared_memory.win32.c
+++ b/source/kit/shared_memory.win32.c
@@ -54,7 +54,6 @@ kit_shared_memory_t kit_shared_memory_open(kit_str_t name, i64 size,
void *p = MapViewOfFile(h, FILE_MAP_ALL_ACCESS, 0, 0,
(SIZE_T) size);
- assert(p != NULL);
if (p == NULL) {
CloseHandle(h);
mem.status = KIT_ERROR_MAP_FAILED;
diff --git a/source/tests/file.test.c b/source/tests/file.test.c
index 2a37c07..86a88e2 100644
--- a/source/tests/file.test.c
+++ b/source/tests/file.test.c
@@ -270,10 +270,8 @@ TEST("file map write") {
REQUIRE_EQ(n, 3);
fclose(f);
- if (n == 3) {
- printf("READ: %d %d %d \n", buf[0], buf[1], buf[2]);
+ if (n == 3)
REQUIRE_EQ(memcmp(buf, "bar", 3), 0);
- }
file_remove(SZ("foo"));
}