]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/alloc.c
Use size_t in xmalloc() and xrealloc().
[libucw.git] / ucw / alloc.c
index bed8c51f104a0d78dbe3e90023ea346fd4fb2320..4562b81521a4340d6845b57e0ca1ab698df75bf4 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#ifndef DEBUG_DMALLOC
-
 void *
-xmalloc(uns size)
+xmalloc(size_t size)
 {
   void *x = malloc(size);
   if (!x)
-    die("Cannot allocate %d bytes of memory", size);
+    die("Cannot allocate %zu bytes of memory", size);
   return x;
 }
 
-#endif
-
 void *
 xmalloc_zero(uns size)
 {