summaryrefslogtreecommitdiffstats
path: root/xmalloc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-01-10 00:37:05 +0100
committerDamien Miller <djm@mindrot.org>2014-01-10 00:37:05 +0100
commit3e49853650448883685cfa32fa382d0ba6d51d48 (patch)
treecc8125afc2ef7cf2ce3098e661b2eaba06c7367d /xmalloc.c
parent - (djm) [regress/.cvsignore] Ignore regress test droppings; ok dtucker@ (diff)
downloadopenssh-3e49853650448883685cfa32fa382d0ba6d51d48.tar.xz
openssh-3e49853650448883685cfa32fa382d0ba6d51d48.zip
- tedu@cvs.openbsd.org 2014/01/04 17:50:55
[mac.c monitor_mm.c monitor_mm.h xmalloc.c] use standard types and formats for size_t like variables. ok dtucker
Diffstat (limited to '')
-rw-r--r--xmalloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 92f781fd0..2f1cd2306 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmalloc.c,v 1.28 2013/05/17 00:13:14 djm Exp $ */
+/* $OpenBSD: xmalloc.c,v 1.29 2014/01/04 17:50:55 tedu Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -33,7 +33,7 @@ xmalloc(size_t size)
fatal("xmalloc: zero size");
ptr = malloc(size);
if (ptr == NULL)
- fatal("xmalloc: out of memory (allocating %lu bytes)", (u_long) size);
+ fatal("xmalloc: out of memory (allocating %zu bytes)", size);
return ptr;
}
@@ -48,8 +48,8 @@ xcalloc(size_t nmemb, size_t size)
fatal("xcalloc: nmemb * size > SIZE_T_MAX");
ptr = calloc(nmemb, size);
if (ptr == NULL)
- fatal("xcalloc: out of memory (allocating %lu bytes)",
- (u_long)(size * nmemb));
+ fatal("xcalloc: out of memory (allocating %zu bytes)",
+ size * nmemb);
return ptr;
}
@@ -68,8 +68,8 @@ xrealloc(void *ptr, size_t nmemb, size_t size)
else
new_ptr = realloc(ptr, new_size);
if (new_ptr == NULL)
- fatal("xrealloc: out of memory (new_size %lu bytes)",
- (u_long) new_size);
+ fatal("xrealloc: out of memory (new_size %zu bytes)",
+ new_size);
return new_ptr;
}