* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int ds_file_munmap(struct ctf_fs_ds_file *ds_file)
{
int ret = 0;
- struct ctf_fs_component *ctf_fs = ds_file->file->ctf_fs;
+ struct ctf_fs_component *ctf_fs;
- if (!ds_file->mmap_addr) {
+ if (!ds_file || !ds_file->mmap_addr) {
goto end;
}
+ ctf_fs = ds_file->file->ctf_fs;
if (munmap(ds_file->mmap_addr, ds_file->mmap_len)) {
PERR("Cannot memory-unmap address %p (size %zu) of file \"%s\" (%p): %s\n",
ds_file->mmap_addr, ds_file->mmap_len,
* medium-specific; there is nothing for the user to do
* and it should have been handled upstream.
*/
- assert(false);
+ abort();
case BT_CTF_NOTIF_ITER_STATUS_INVAL:
case BT_CTF_NOTIF_ITER_STATUS_ERROR:
default:
case BT_CTF_NOTIF_ITER_STATUS_OK:
break;
case BT_CTF_NOTIF_ITER_STATUS_AGAIN:
- assert(false);
+ abort();
case BT_CTF_NOTIF_ITER_STATUS_INVAL:
case BT_CTF_NOTIF_ITER_STATUS_ERROR:
default: