File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1212 * -----------------------------------------------------------------------------
1313 */
1414#include "fossil/sys/memory.h"
15- #include <stdlib.h>
15+ #include <stdlib.h> // Needed for posix_memalign
1616#include <string.h>
1717#include <stdio.h>
1818
Original file line number Diff line number Diff line change @@ -240,8 +240,7 @@ FOSSIL_TEST(c_test_memory_stats) {
240240 size_t allocs = 0 , bytes = 0 ;
241241 fossil_sys_memory_stats (& allocs , & bytes );
242242 // Just check that the function runs and returns something
243- ASSUME_ITS_TRUE (allocs >= (size_t )0 );
244- ASSUME_ITS_TRUE (bytes >= (size_t )0 );
243+ ASSUME_ITS_TRUE (allocs != 0 || bytes != 0 );
245244}
246245
247246// * * * * * * * * * * * * * * * * * * * * * * * *
Original file line number Diff line number Diff line change @@ -410,8 +410,8 @@ FOSSIL_TEST(cpp_test_memory_class_stats) {
410410 size_t allocs = 0 , bytes = 0 ;
411411 fossil::sys::Memory::stats (&allocs, &bytes);
412412 // Just check that stats call does not crash and returns something
413- ASSUME_ITS_TRUE (allocs >= ( size_t ) 0 );
414- ASSUME_ITS_TRUE (bytes >= ( size_t ) 0 );
413+ ASSUME_ITS_TRUE (& allocs != nullptr );
414+ ASSUME_ITS_TRUE (& bytes != nullptr );
415415}
416416
417417// * * * * * * * * * * * * * * * * * * * * * * * *
You can’t perform that action at this time.
0 commit comments