X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=8b9f1633d95be658c7a6ecc40f291a0e033943bd;hp=598a12f510ecef9cefe13811a848d89cfb90d9a8;hb=77264e47dcd6a606ecff2f86f14359f25ab0eba0;hpb=471684761a2039bbc89aa1e3c33c62de6bef86cf diff --git a/string.c b/string.c index 598a12f5..8b9f1633 100644 --- a/string.c +++ b/string.c @@ -36,6 +36,7 @@ __must_check __malloc void *para_realloc(void *p, size_t size) * No need to check for NULL pointers: If p is NULL, the call * to realloc is equivalent to malloc(size) */ + assert(size); if (!(p = realloc(p, size))) { PARA_EMERG_LOG("realloc failed (size = %zu), aborting\n", size); @@ -58,6 +59,7 @@ __must_check __malloc void *para_realloc(void *p, size_t size) */ __must_check __malloc void *para_malloc(size_t size) { + assert(size); void *p = malloc(size); if (!p) {