Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20261118125553.9133-9-ilt@envs.net>
Date: Wed, 18 Nov 2026 15:49:50 +0300
From: illiliti <ilt@...s.net>
To: musl@...ts.openwall.com
Cc: illiliti <ilt@...s.net>
Subject: [PATCH v1 08/18] fts: use realloc instead of reallocarr

---
 src/misc/fts.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/misc/fts.c b/src/misc/fts.c
index 9196dc95..b4ec666b 100644
--- a/src/misc/fts.c
+++ b/src/misc/fts.c
@@ -971,10 +971,10 @@ fts_sort(FTS *sp, FTSENT *head, size_t nitems)
 	 * 40 so don't realloc one entry at a time.
 	 */
 	if (nitems > sp->fts_nitems) {
-		errno = reallocarr(&sp->fts_array,
-		    nitems + 40, sizeof(*sp->fts_array));
-		if (errno)
+		FTSENT **new = realloc(sp->fts_array, sizeof(FTSENT *) * (nitems + 40));
+		if (!new)
 			return head;
+		sp->fts_array = new;
 		sp->fts_nitems = fts_nitems_truncate(nitems + 40);
 	}
 	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
-- 
2.55.0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.