libgrapheme

Freestanding C library for unicode string handling
git clone https://git.sinitax.com/suckless/libgrapheme
Log | Files | Refs | README | LICENSE | sfeed.txt

commit d6bdaa7d2bfb57e798bc3669135479310c77834c
parent bdf42537c5792f6beb0360517ff378834cfd8a68
Author: Laslo Hunhold <dev@frign.de>
Date:   Sun, 31 Jul 2022 11:44:54 +0200

Rename reallocarray() to reallocate_array() to prevent mangling

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Mgen/util.c | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/gen/util.c b/gen/util.c @@ -32,7 +32,7 @@ struct break_test_payload }; static void * -reallocarray(void *p, size_t len, size_t size) +reallocate_array(void *p, size_t len, size_t size) { if (len > 0 && size > SIZE_MAX/len) { errno = ENOMEM; @@ -271,10 +271,10 @@ properties_compress(const struct properties *prop, * add current properties to data and add the * offset in the offset-table */ - if (!(comp->data = reallocarray(comp->data, - ++(comp->datalen), - sizeof(*(comp->data))))) { - fprintf(stderr, "reallocarray: %s\n", + if (!(comp->data = reallocate_array(comp->data, + ++(comp->datalen), + sizeof(*(comp->data))))) { + fprintf(stderr, "reallocate_array: %s\n", strerror(errno)); exit(1); } @@ -336,10 +336,10 @@ properties_get_major_minor(const struct properties_compressed *comp, * in major */ mm->minorlen += 0x100; - if (!(mm->minor = reallocarray(mm->minor, - mm->minorlen, - sizeof(*(mm->minor))))) { - fprintf(stderr, "reallocarray: %s\n", + if (!(mm->minor = reallocate_array(mm->minor, + mm->minorlen, + sizeof(*(mm->minor))))) { + fprintf(stderr, "reallocate_array: %s\n", strerror(errno)); exit(1); }