X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=8b9f1633d95be658c7a6ecc40f291a0e033943bd;hp=598a12f510ecef9cefe13811a848d89cfb90d9a8;hb=b42f370628f56fdf0d7b9261567eb2033c9ae18a;hpb=e373f7da2c890a1af8f46d444057609b15f3d248 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) {