diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-17 13:56:22 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-17 13:56:22 -0200 |
commit | af6d9f31165a13c34c0601f37ca5a67c365d1d01 (patch) | |
tree | b38572c639b77113a06fc8546378a7ca519c919d /ltests.c | |
parent | 2258f3133b27a6a3db703644311e0a59b6c7b0f6 (diff) | |
download | lua-af6d9f31165a13c34c0601f37ca5a67c365d1d01.tar.gz lua-af6d9f31165a13c34c0601f37ca5a67c365d1d01.tar.bz2 lua-af6d9f31165a13c34c0601f37ca5a67c365d1d01.zip |
Details
A few details in the makefile and in the manual. (In particular,
it updates the dependency lists in the makefile.)
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -156,7 +156,8 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) { | |||
156 | size_t realsize = sizeof(Header) + size + MARKSIZE; | 156 | size_t realsize = sizeof(Header) + size + MARKSIZE; |
157 | if (realsize < size) return NULL; /* arithmetic overflow! */ | 157 | if (realsize < size) return NULL; /* arithmetic overflow! */ |
158 | newblock = cast(Header *, malloc(realsize)); /* alloc a new block */ | 158 | newblock = cast(Header *, malloc(realsize)); /* alloc a new block */ |
159 | if (newblock == NULL) return NULL; /* really out of memory? */ | 159 | if (newblock == NULL) |
160 | return NULL; /* really out of memory? */ | ||
160 | if (block) { | 161 | if (block) { |
161 | memcpy(newblock + 1, block + 1, commonsize); /* copy old contents */ | 162 | memcpy(newblock + 1, block + 1, commonsize); /* copy old contents */ |
162 | freeblock(mc, block); /* erase (and check) old copy */ | 163 | freeblock(mc, block); /* erase (and check) old copy */ |