correct default memory allocation
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 20 Feb 2023 16:31:44 +0000 (17:31 +0100)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 20 Feb 2023 16:31:44 +0000 (17:31 +0100)
storage.c

index 4a559f27433086ceda169ce7f734afffd8450157..54815e2d98e69c299e208920ad4350128ce3b03c 100644 (file)
--- a/storage.c
+++ b/storage.c
@@ -21,7 +21,7 @@ int memory (int nb)
     if ((nb != -1) && (nb != size_tab (storage))) {
         storage = resize_tab (storage, nb);
     }
-    if (size_tab (storage) == -1) {
+    if (nb == -1) {
         memory (DEFAULT_STORAGE_SIZE);
     }
     return size_tab (storage);