]> wimlib.net Git - wimlib/commitdiff
Remove "memory exhausted" error messages
authorEric Biggers <ebiggers3@gmail.com>
Sun, 26 Oct 2014 23:47:12 +0000 (18:47 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 27 Oct 2014 00:02:15 +0000 (19:02 -0500)
Calling code checks for NULL returns anyway, and in the case of
allocating chunk compressors there is a fallback so there shouldn't
be an error message.

src/util.c

index fcfa962838529ba3190f1b5126cbea2cf63fd5b6..6e9ae23e993f4e4977247195a38d7afeee676ec5 100644 (file)
@@ -413,7 +413,6 @@ retry:
                        size++;
                        goto retry;
                }
-               ERROR("memory exhausted");
        }
        return ptr;
 }
@@ -429,10 +428,7 @@ wimlib_realloc(void *ptr, size_t size)
 {
        if (size == 0)
                size = 1;
-       ptr = (*wimlib_realloc_func)(ptr, size);
-       if (ptr == NULL)
-               ERROR("memory exhausted");
-       return ptr;
+       return (*wimlib_realloc_func)(ptr, size);
 }
 
 void *