* \param start The start address of the memory mapping.
* \param length The size of the mapping.
*
- * \return Standard.
+ * If NULL is passed as the start address, the length value is ignored and the
+ * function does nothing.
+ *
+ * \return Zero if NULL was passed, one if the memory area was successfully
+ * unmapped, a negative error code otherwise.
*
* \sa munmap(2), \ref mmap_full_file().
*/
int para_munmap(void *start, size_t length)
{
- int err;
-
if (!start)
return 0;
if (munmap(start, length) >= 0)
return 1;
- err = errno;
- PARA_ERROR_LOG("munmap (%p/%zu) failed: %s\n", start, length,
- strerror(err));
- return -ERRNO_TO_PARA_ERROR(err);
+ return -ERRNO_TO_PARA_ERROR(errno);
}
/**