]> Savannah Git Hosting - gnulib.git/commit
realloc-posix: realloc (p, 0) yields nonnull
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 30 Oct 2024 05:01:42 +0000 (22:01 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 30 Oct 2024 05:02:09 +0000 (22:02 -0700)
commit70f9c1de503dff767d2b7665229ad53506085444
tree1f1b347d67a11d7b7a60476f6e8da48389d9c7ca
parent3f44e474efd0eae2333b94c74b2c4193cc17fdba
realloc-posix: realloc (p, 0) yields nonnull

* lib/realloc.c: Include <stdckdint.h>, not "xalloc-oversized.h".
Use of xalloc_oversized replaced by ckd_add.
(rpl_realloc) [!NEED_SANITIZED_REALLOC]:
Treat realloc (p, 0) as if it were a realloc (p, 1) that never fails.
That’s easier, reduces module dependencies,
and better supports the future alloc-0-nonnull module.
* modules/realloc-posix (Depends-on): Remove free-posix,
malloc-posix, xalloc-oversized.  Add stdckdint.
ChangeLog
lib/realloc.c
modules/realloc-posix