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

@@ -9,7 +9,7 @@ typedef int malloc_cpuid_t;
/* When realloc(non-null-ptr, 0) is called, what happens? */
enum zero_realloc_action_e {
/* Realloc(ptr, 0) is free(ptr); return malloc(0); */
zero_realloc_action_strict = 0,
zero_realloc_action_alloc = 0,
/* Realloc(ptr, 0) is free(ptr); */
zero_realloc_action_free = 1,
/* Realloc(ptr, 0) aborts. */