summaryrefslogtreecommitdiff
path: root/listing.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 13:49:56 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 15:36:06 -0800
commite02e32f71f6c24fcc69bdaf58f6f9e973a017896 (patch)
tree942bf0f4eafd2fac63249fb0250c4867403abde5 /listing.c
parent75af06f5f8ffc41fabd100253aad222cb4ab8662 (diff)
downloadxorg-app-xkbcomp-e02e32f71f6c24fcc69bdaf58f6f9e973a017896.tar.gz
Replace uTypedRealloc() with direct reallocarray() calls
Falls back to realloc() if platform doesn't offer reallocarray(). Also removes uRealloc() since it had no other uses. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'listing.c')
-rw-r--r--listing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/listing.c b/listing.c
index b747482..795389b 100644
--- a/listing.c
+++ b/listing.c
@@ -155,7 +155,7 @@ AddMapOnly(char *map)
szMapOnly = 5;
else
szMapOnly *= 2;
- mapOnly = uTypedRealloc(list, szMapOnly, char *);
+ mapOnly = reallocarray(list, szMapOnly, sizeof(char *));
if (!mapOnly)
{
WSGO("Couldn't allocate list of maps\n");
@@ -175,7 +175,7 @@ AddListing(char *file, char *map)
szListing = 10;
else
szListing *= 2;
- list = uTypedRealloc(list, szListing, Listing);
+ list = reallocarray(list, szListing, sizeof(Listing));
if (!list)
{
WSGO("Couldn't allocate list of files and maps\n");