]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/alloc.c
Added string functions for matching of prefixes and suffixes
[libucw.git] / ucw / alloc.c
index bed8c51f104a0d78dbe3e90023ea346fd4fb2320..4528e09757f16d4a00e444e1a33973921fcc5736 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)
+xmalloc_zero(size_t size)
 {
   void *x = xmalloc(size);
   bzero(x, size);