diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 12:31:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 12:31:56 (GMT) |
commit | 262b6297ea2f920b93647282240008fb6b77b0e9 (patch) | |
tree | f3efaa8264fe428fc1cc73603adc5d94fcd39462 /generic/tclAlloc.c | |
parent | f0ec68f07293dac2b967d45a3697073b77688970 (diff) | |
download | tcl-262b6297ea2f920b93647282240008fb6b77b0e9.zip tcl-262b6297ea2f920b93647282240008fb6b77b0e9.tar.gz tcl-262b6297ea2f920b93647282240008fb6b77b0e9.tar.bz2 |
Eliminate many "register" keywords (which do nothing with modern compilers)
Eliminate many unnecessary type-casts to (unsigned)
Diffstat (limited to 'generic/tclAlloc.c')
-rw-r--r-- | generic/tclAlloc.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 39b9395..dd83385 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -253,9 +253,9 @@ char * TclpAlloc( unsigned int numBytes) /* Number of bytes to allocate. */ { - register union overhead *overPtr; - register long bucket; - register unsigned amount; + union overhead *overPtr; + long bucket; + unsigned amount; struct block *bigBlockPtr = NULL; if (!allocInit) { @@ -274,7 +274,7 @@ TclpAlloc( if (numBytes >= MAXMALLOC - OVERHEAD) { if (numBytes <= UINT_MAX - OVERHEAD -sizeof(struct block)) { - bigBlockPtr = (struct block *) TclpSysAlloc((unsigned) + bigBlockPtr = (struct block *) TclpSysAlloc( (sizeof(struct block) + OVERHEAD + numBytes), 0); } if (bigBlockPtr == NULL) { @@ -387,8 +387,8 @@ static void MoreCore( int bucket) /* What bucket to allocat to. */ { - register union overhead *overPtr; - register long size; /* size of desired block */ + union overhead *overPtr; + long size; /* size of desired block */ long amount; /* amount to allocate */ int numBlocks; /* how many blocks we get */ struct block *blockPtr; @@ -405,7 +405,7 @@ MoreCore( numBlocks = amount / size; ASSERT(numBlocks*size == amount); - blockPtr = (struct block *) TclpSysAlloc((unsigned) + blockPtr = (struct block *) TclpSysAlloc( (sizeof(struct block) + amount), 1); /* no more room! */ if (blockPtr == NULL) { @@ -448,8 +448,8 @@ void TclpFree( char *oldPtr) /* Pointer to memory to free. */ { - register long size; - register union overhead *overPtr; + long size; + union overhead *overPtr; struct block *bigBlockPtr; if (oldPtr == NULL) { @@ -645,8 +645,8 @@ void mstats( char *s) /* Where to write info. */ { - register int i, j; - register union overhead *overPtr; + int i, j; + union overhead *overPtr; int totalFree = 0, totalUsed = 0; Tcl_MutexLock(allocMutexPtr); |