diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-27 08:34:05 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-02-27 08:34:05 (GMT) |
commit | f04b875d88bbe9cd4d2114d60c194be01a7c9e04 (patch) | |
tree | 34dde540a1ed936003a721aec62cf6ede6e5bfa2 /generic/tclAlloc.c | |
parent | 4fdbe79875a43efd9f42e75ccf256884f657dac3 (diff) | |
download | tcl-f04b875d88bbe9cd4d2114d60c194be01a7c9e04.zip tcl-f04b875d88bbe9cd4d2114d60c194be01a7c9e04.tar.gz tcl-f04b875d88bbe9cd4d2114d60c194be01a7c9e04.tar.bz2 |
More use of (efficient) TclHasIntRep() macro. Also eliminate many (size_t) and (unsigned) type-casts, which don't make sense any more.
Diffstat (limited to 'generic/tclAlloc.c')
-rw-r--r-- | generic/tclAlloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index df1718b..bad3d8a 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -274,8 +274,8 @@ TclpAlloc( if (numBytes >= MAXMALLOC - OVERHEAD) { if (numBytes <= UINT_MAX - OVERHEAD -sizeof(struct block)) { - bigBlockPtr = (struct block *) TclpSysAlloc((unsigned) - (sizeof(struct block) + OVERHEAD + numBytes), 0); + bigBlockPtr = (struct block *) TclpSysAlloc( + sizeof(struct block) + OVERHEAD + numBytes, 0); } if (bigBlockPtr == NULL) { Tcl_MutexUnlock(allocMutexPtr); @@ -604,7 +604,7 @@ TclpRealloc( if (maxSize < numBytes) { numBytes = maxSize; } - memcpy(newPtr, oldPtr, (size_t) numBytes); + memcpy(newPtr, oldPtr, numBytes); TclpFree(oldPtr); return newPtr; } |