diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-29 17:57:28 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-03-29 17:57:28 (GMT) |
| commit | 67857c0b6ef1d96293f412a3908f7076afecb8d6 (patch) | |
| tree | 050f7582a6ff9dda231f51d273127de8043194f3 /generic/tclThreadAlloc.c | |
| parent | 3cd9927e9bf6f937e8cd932675df66c01011c8ed (diff) | |
| download | tcl-67857c0b6ef1d96293f412a3908f7076afecb8d6.zip tcl-67857c0b6ef1d96293f412a3908f7076afecb8d6.tar.gz tcl-67857c0b6ef1d96293f412a3908f7076afecb8d6.tar.bz2 | |
Minor code cleanup: More use of size_t where possible, and elimination of unneeded type-casts.
Diffstat (limited to 'generic/tclThreadAlloc.c')
| -rw-r--r-- | generic/tclThreadAlloc.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c index cf275c8..77fdd70 100644 --- a/generic/tclThreadAlloc.c +++ b/generic/tclThreadAlloc.c @@ -308,19 +308,6 @@ TclpAlloc( register int bucket; size_t size; -#ifndef __LP64__ - if (sizeof(int) >= sizeof(size_t)) { - /* An unsigned int overflow can also be a size_t overflow */ - const size_t zero = 0; - const size_t max = ~zero; - - if (reqSize > max - sizeof(Block) - RCHECK) { - /* Requested allocation exceeds memory */ - return NULL; - } - } -#endif - GETCACHE(cachePtr); /* @@ -450,19 +437,6 @@ TclpRealloc( return TclpAlloc(reqSize); } -#ifndef __LP64__ - if (sizeof(int) >= sizeof(size_t)) { - /* An unsigned int overflow can also be a size_t overflow */ - const size_t zero = 0; - const size_t max = ~zero; - - if ((reqSize) > max - sizeof(Block) - RCHECK) { - /* Requested allocation exceeds memory */ - return NULL; - } - } -#endif - GETCACHE(cachePtr); /* |
