diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-11-09 21:56:58 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-11-09 21:56:58 (GMT) |
commit | 3e4f6138b60d8363c377e453d63f875775ec907a (patch) | |
tree | 093aff8f3e7442f7e16be7cff4c1f3741c9c2260 /src | |
parent | 51b80a8d8585b9ccb471966d235cd99379c3bcf3 (diff) | |
download | hdf5-3e4f6138b60d8363c377e453d63f875775ec907a.zip hdf5-3e4f6138b60d8363c377e453d63f875775ec907a.tar.gz hdf5-3e4f6138b60d8363c377e453d63f875775ec907a.tar.bz2 |
Removed asserts from H5MM calls that conflict with stated behavior
and added a test to ensure that this doesn't happen in the future.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5MM.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -268,8 +268,6 @@ H5MM_malloc(size_t size) { void *ret_value = NULL; - HDassert(size); - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -357,8 +355,6 @@ H5MM_calloc(size_t size) { void *ret_value = NULL; - HDassert(size); - /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -407,8 +403,6 @@ H5MM_realloc(void *mem, size_t size) /* Use FUNC_ENTER_NOAPI_NOINIT_NOERR here to avoid performance issues */ FUNC_ENTER_NOAPI_NOINIT_NOERR - HDassert(mem || size); - if(NULL == mem && 0 == size) /* Not defined in the standard, return NULL */ ret_value = NULL; @@ -454,7 +448,7 @@ H5MM_realloc(void *mem, size_t size) * NULL is an acceptable value for the input string. * * Return: Success: Pointer to a new string (NULL if s is NULL). - * Failure: abort() + * Failure: NULL * * Programmer: Robb Matzke * Jul 10 1997 |