summaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 097c3cf3..ac68bd32 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1013,10 +1013,10 @@ static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
1013 } 1013 }
1014 else { /* cannot fail when shrinking a block */ 1014 else { /* cannot fail when shrinking a block */
1015 void *newptr = realloc(ptr, nsize); 1015 void *newptr = realloc(ptr, nsize);
1016 if (newptr == NULL && ptr != NULL && nsize <= osize) 1016 if (newptr == NULL && ptr != NULL && nsize <= osize)
1017 return ptr; /* keep the original block */ 1017 return ptr; /* keep the original block */
1018 else /* no fail or not shrinking */ 1018 else /* no fail or not shrinking */
1019 return newptr; /* use the new block */ 1019 return newptr; /* use the new block */
1020 } 1020 }
1021} 1021}
1022 1022