Skip to content

Commit

Permalink
assert_malloc_size: fix an assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Aug 8, 2024
1 parent 85efc46 commit a954b17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ assert_malloc_size(void *p, size_t sz)
{
#if !defined(NDEBUG) && defined(__APPLE__)
size_t msz = malloc_size(p);
assert(msz == sz);
assert(msz >= sz); /* malloc_size can return larger */
#endif
}

Expand Down

0 comments on commit a954b17

Please sign in to comment.