diff --git a/monitor_mm.c b/monitor_mm.c
index d3e6aee..0ba0658 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_mm.c,v 1.18 2013/11/08 00:39:15 djm Exp $ */
+/* $OpenBSD: monitor_mm.c,v 1.19 2014/01/04 17:50:55 tedu Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
  * All rights reserved.
@@ -35,6 +35,7 @@
 
 #include <errno.h>
 #include <stdarg.h>
+#include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -46,7 +47,7 @@
 static int
 mm_compare(struct mm_share *a, struct mm_share *b)
 {
-	long diff = (char *)a->address - (char *)b->address;
+	ptrdiff_t diff = (char *)a->address - (char *)b->address;
 
 	if (diff == 0)
 		return (0);
@@ -73,8 +74,8 @@
 
 	tmp2 = RB_INSERT(mmtree, head, tmp);
 	if (tmp2 != NULL)
-		fatal("mm_make_entry(%p): double address %p->%p(%lu)",
-		    mm, tmp2, address, (u_long)size);
+		fatal("mm_make_entry(%p): double address %p->%p(%zu)",
+		    mm, tmp2, address, size);
 
 	return (tmp);
 }
@@ -101,7 +102,7 @@
 
 	address = xmmap(size);
 	if (address == (void *)MAP_FAILED)
-		fatal("mmap(%lu): %s", (u_long)size, strerror(errno));
+		fatal("mmap(%zu): %s", size, strerror(errno));
 
 	mm->address = address;
 	mm->size = size;
@@ -141,7 +142,7 @@
 
 #ifdef HAVE_MMAP
 	if (munmap(mm->address, mm->size) == -1)
-		fatal("munmap(%p, %lu): %s", mm->address, (u_long)mm->size,
+		fatal("munmap(%p, %zu): %s", mm->address, mm->size,
 		    strerror(errno));
 #else
 	fatal("%s: UsePrivilegeSeparation=yes and Compression=yes not supported",
@@ -160,7 +161,7 @@
 
 	address = mm_malloc(mm, size);
 	if (address == NULL)
-		fatal("%s: mm_malloc(%lu)", __func__, (u_long)size);
+		fatal("%s: mm_malloc(%zu)", __func__, size);
 	memset(address, 0, size);
 	return (address);
 }
@@ -195,7 +196,7 @@
 
 	/* Does not change order in RB tree */
 	mms->size -= size;
-	mms->address = (u_char *)mms->address + size;
+	mms->address = (char *)mms->address + size;
 
 	if (mms->size == 0) {
 		RB_REMOVE(mmtree, &mm->rb_free, mms);
@@ -248,8 +249,8 @@
 
 	/* Check if range does not overlap */
 	if (prev != NULL && MM_ADDRESS_END(prev) > address)
-		fatal("mm_free: memory corruption: %p(%lu) > %p",
-		    prev->address, (u_long)prev->size, address);
+		fatal("mm_free: memory corruption: %p(%zu) > %p",
+		    prev->address, prev->size, address);
 
 	/* See if we can merge backwards */
 	if (prev != NULL && MM_ADDRESS_END(prev) == address) {
@@ -271,8 +272,8 @@
 		return;
 
 	if (MM_ADDRESS_END(prev) > mms->address)
-		fatal("mm_free: memory corruption: %p < %p(%lu)",
-		    mms->address, prev->address, (u_long)prev->size);
+		fatal("mm_free: memory corruption: %p < %p(%zu)",
+		    mms->address, prev->address, prev->size);
 	if (MM_ADDRESS_END(prev) != mms->address)
 		return;
 
@@ -343,12 +344,12 @@
 void
 mm_memvalid(struct mm_master *mm, void *address, size_t size)
 {
-	void *end = (u_char *)address + size;
+	void *end = (char *)address + size;
 
 	if (address < mm->address)
 		fatal("mm_memvalid: address too small: %p", address);
 	if (end < address)
 		fatal("mm_memvalid: end < address: %p < %p", end, address);
-	if (end > (void *)((u_char *)mm->address + mm->size))
+	if (end > MM_ADDRESS_END(mm))
 		fatal("mm_memvalid: address too large: %p", address);
 }
