changeset 873:6c42b9c76464 HEAD

Use void* always with munmap()
author Timo Sirainen <tss@iki.fi>
date Sun, 29 Dec 2002 21:33:04 +0200
parents 6377d4f7a31c
children a60e12a66ad3
files src/lib/mmap-anon.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/mmap-anon.c	Sun Dec 29 21:25:48 2002 +0200
+++ b/src/lib/mmap-anon.c	Sun Dec 29 21:33:04 2002 +0200
@@ -234,7 +234,7 @@
 		p -= block_size;
 
 		memcpy((char *) new_base + (p - (char *) hdr), p, block_size);
-		if (munmap(p, block_size) < 0)
+		if (munmap((void *) p, block_size) < 0)
 			i_panic("munmap() failed: %m");
 	} while (p != (char *) hdr);
 
@@ -276,7 +276,7 @@
 
 	if (new_size < hdr->size) {
 		/* shrink */
-		if (munmap((char *) hdr + header_size + new_size,
+		if (munmap((void *) ((char *) hdr + header_size + new_size),
 			   hdr->size - new_size) < 0)
 			i_panic("munmap() failed: %m");
 		hdr->size = new_size;
@@ -298,7 +298,7 @@
 	if (hdr->signature != MMAP_SIGNATURE)
 		i_panic("movable_munmap(): Invalid address");
 
-	if (munmap(hdr, hdr->size + header_size) < 0)
+	if (munmap((void *) hdr, hdr->size + header_size) < 0)
 		i_panic("munmap() failed: %m");
 
 	return 0;