No need to +1 for comparision in correct_known_resize
authorDale Weiler <killfieldengine@gmail.com>
Sun, 6 Jan 2013 10:37:09 +0000 (10:37 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 6 Jan 2013 10:37:09 +0000 (10:37 +0000)
correct.c

index 442afb253f660136fd4a7104f03b9f2663a5f5a2..5be4f3528d405f112b7e8b0a31c71e0c9629bd76 100644 (file)
--- a/correct.c
+++ b/correct.c
@@ -457,7 +457,7 @@ static int correct_exist(char **array, size_t rows, char *ident) {
 static GMQCC_INLINE char **correct_known_resize(char **res, size_t *allocated, size_t size) {
     size_t oldallocated = *allocated;
     char **out;
-    if (size+1 < oldallocated)
+    if (size < oldallocated)
         return res;
 
     out = correct_pool_alloc(sizeof(*res) * oldallocated + 32);