Rename zero_realloc option "strict" to "alloc".

With realloc(ptr, 0) being UB per C23, the option name "strict" makes less sense
now.  Rename to "alloc" which describes the behavior.
This commit is contained in:
Qi Wang
2022-04-15 12:17:59 -07:00
committed by Qi Wang
parent 5841b6dbe7
commit 0e29ad4efa
7 changed files with 16 additions and 16 deletions

View File

@@ -24,7 +24,7 @@ deallocated() {
return deallocated;
}
TEST_BEGIN(test_realloc_strict) {
TEST_BEGIN(test_realloc_alloc) {
void *ptr = mallocx(1, 0);
expect_ptr_not_null(ptr, "Unexpected mallocx error");
uint64_t allocated_before = allocated();
@@ -44,5 +44,5 @@ TEST_END
int
main(void) {
return test(
test_realloc_strict);
test_realloc_alloc);
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
export MALLOC_CONF="zero_realloc:alloc"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
export MALLOC_CONF="zero_realloc:strict"