From 688f07d3027f967625c19726f16ff44b85eba4fd Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 31 Mar 2020 09:31:49 -0400 Subject: [PATCH] Changed mallocMagic() argument to size_t. However, this is probably not useful so long as Tcl_Alloc() has (unsigned int) for an argument. The more important investigation is probably to determine if there is a way to keep csa2_list from growing to absurdly large sizes on connectivity checks. --- utils/malloc.c | 6 +++--- utils/malloc.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/malloc.c b/utils/malloc.c index d095a502..b7fc8ed8 100644 --- a/utils/malloc.c +++ b/utils/malloc.c @@ -92,7 +92,7 @@ static char *freeDelayedItem = NULL; void * mallocMagic(nbytes) - unsigned int nbytes; + size_t nbytes; { void *p; @@ -150,12 +150,12 @@ freeMagic(cp) void * callocMagic(nbytes) - unsigned int nbytes; + size_t nbytes; { void *cp; cp = mallocMagic(nbytes); - bzero(cp, (int) nbytes); + bzero(cp, (size_t) nbytes); return (cp); } diff --git a/utils/malloc.h b/utils/malloc.h index d1c7a2ee..1bb587bf 100644 --- a/utils/malloc.h +++ b/utils/malloc.h @@ -22,8 +22,8 @@ #ifndef _MALLOC_H #define _MALLOC_H -extern void *mallocMagic(unsigned int); -extern void *callocMagic(unsigned int); +extern void *mallocMagic(size_t); +extern void *callocMagic(size_t); extern void freeMagic(void *); #endif