return NULL;
}
- *m = (struct GNUNET_IO_Handle *) GNUNET_malloc (sizeof (struct GNUNET_IO_Handle));
+ *m = GNUNET_malloc (sizeof (struct GNUNET_IO_Handle));
(*m)->h = CreateFileMapping (h->h, NULL, protect, 0, 0, NULL);
if ((*m)->h == INVALID_HANDLE_VALUE)
{
prot = PROT_READ;
if (access & GNUNET_DISK_MAP_WRITE)
prot |= PROT_WRITE;
-
+ *m = NULL;
return mmap (NULL, len, prot, MAP_SHARED, h->fd, 0);
#endif
}
#ifdef MINGW
int ret;
- if (h == NULL || *h == NULL)
+ if ( (h == NULL) || (*h == NULL) )
{
errno = EINVAL;
return GNUNET_SYSERR;
return ret;
#else
- int ret;
- ret = munmap (addr, len) != -1 ? GNUNET_OK : GNUNET_SYSERR;
- GNUNET_DISK_handle_invalidate (*h);
- return ret;
+ return munmap (addr, len) != -1 ? GNUNET_OK : GNUNET_SYSERR;
#endif
}