smalloc: fix int truncation issue

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/smalloc.c b/smalloc.c
index d0b6f1e..9f40f65 100644
--- a/smalloc.c
+++ b/smalloc.c
@@ -431,10 +431,13 @@
 	return ptr;
 }
 
-void *smalloc(unsigned int size)
+void *smalloc(size_t size)
 {
 	unsigned int i;
 
+	if (size != (unsigned int) size)
+		return NULL;
+
 	global_write_lock();
 	i = last_pool;