mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Avoid NULL pointer arithmetic in MemContext unit test.
Similar to b23a2a0b. In this case add 1 to avoid a NULL pointer. Found on MacOS M1.
This commit is contained in:
parent
fe8ef3197e
commit
a7d32259cf
@ -170,7 +170,7 @@ testRun(void)
|
||||
if (testBegin("memContextAlloc(), memNew*(), memGrow(), and memFree()"))
|
||||
{
|
||||
TEST_RESULT_UINT(sizeof(MemContextAlloc), 8, "check MemContextAlloc size (same for 32/64 bit)");
|
||||
TEST_RESULT_PTR(MEM_CONTEXT_ALLOC_BUFFER((void *)0), (void *)sizeof(MemContextAlloc), "check buffer macro");
|
||||
TEST_RESULT_PTR(MEM_CONTEXT_ALLOC_BUFFER((void *)1), (void *)(sizeof(MemContextAlloc) + 1), "check buffer macro");
|
||||
TEST_RESULT_PTR(MEM_CONTEXT_ALLOC_HEADER((void *)sizeof(MemContextAlloc)), (void *)0, "check header macro");
|
||||
|
||||
memContextSwitch(memContextTop());
|
||||
|
Loading…
x
Reference in New Issue
Block a user