Loading...
tests/malloc_size_test.c libmalloc-715.120.13 libmalloc-646.0.13
--- libmalloc/libmalloc-715.120.13/tests/malloc_size_test.c
+++ libmalloc/libmalloc-646.0.13/tests/malloc_size_test.c
@@ -133,12 +133,12 @@
 {
 	void *ptr = malloc(GiB(4));
 	T_ASSERT_NOTNULL(ptr, "4GB allocation");
-	T_ASSERT_GE(malloc_size(ptr), (size_t)GiB(4), "size of 4GB allocation");
+	T_ASSERT_GE(malloc_size(ptr), GiB(4), "size of 4GB allocation");
 	free(ptr);
 
 	ptr = malloc(GiB(6));
 	T_ASSERT_NOTNULL(ptr, "6GB allocation");
-	T_ASSERT_GE(malloc_size(ptr), (size_t)GiB(6), "size of 6GB allocation");
+	T_ASSERT_GE(malloc_size(ptr), GiB(6), "size of 6GB allocation");
 	free(ptr);
 }
 #endif // TARGET_OS_OSX
@@ -149,10 +149,10 @@
 {
 	void *ptr = malloc(MiB(12));
 	T_ASSERT_NOTNULL(ptr, "HUGE allocation");
-	T_ASSERT_LE((size_t)MiB(12), malloc_size(ptr), "Allocated sufficient size");
-	T_ASSERT_EQ((size_t)0, malloc_size((void*)((uintptr_t)ptr + KiB(8))),
+	T_ASSERT_LE(MiB(12), malloc_size(ptr), "Allocated sufficient size");
+	T_ASSERT_EQ(0, malloc_size((void*)((uintptr_t)ptr + KiB(8))),
 			"malloc_size is 0 for inner huge pointer in first segment granule");
-	T_ASSERT_EQ((size_t)0, malloc_size((void*)((uintptr_t)ptr + MiB(8))),
+	T_ASSERT_EQ(0, malloc_size((void*)((uintptr_t)ptr + MiB(8))),
 			"malloc_size is 0 for inner huge pointer in last segment granule");
 
 	free(ptr);
@@ -176,12 +176,12 @@
 	// The next allocation should always be above the 64GB mark
 	void *high_ptr = malloc(size);
 	T_ASSERT_NOTNULL(high_ptr, "Allocation outside embedded address space");
-	T_ASSERT_LE((uintptr_t)GiB(64), (uintptr_t)high_ptr, "Allocated pointer above 64GB");
+	T_ASSERT_LE(GiB(64), (uintptr_t)high_ptr, "Allocated pointer above 64GB");
 	T_ASSERT_LE(size, malloc_size(high_ptr),
 			"Size of pointer outside embedded address space");
 
 	free(high_ptr);
-	T_ASSERT_EQ(0ul, malloc_size(high_ptr), "Size is zero after freeing");
+	T_ASSERT_EQ(0, malloc_size(high_ptr), "Size is zero after freeing");
 
 	for (int i = 0; i < num_pointers; i++) {
 		free(ptrs[i]);