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.
This commit is contained in:
Tim Edwards 2020-03-31 09:31:49 -04:00
parent b5e06455c5
commit 688f07d302
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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