aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-17 13:56:22 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-12-17 13:56:22 -0200
commitaf6d9f31165a13c34c0601f37ca5a67c365d1d01 (patch)
treeb38572c639b77113a06fc8546378a7ca519c919d /ltests.c
parent2258f3133b27a6a3db703644311e0a59b6c7b0f6 (diff)
downloadlua-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index a38a8926..0b5ed90b 100644
--- a/ltests.c
+++ b/ltests.c
@@ -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 */