summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff/xmalloc.h
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-04-29 04:00:25 +0000
committerderaadt <deraadt@openbsd.org>2015-04-29 04:00:25 +0000
commit371275cabfe7ee71db4f4e23b9a5d966b335d3bc (patch)
tree09cf87945bdcad26b880cf103ee5c9a520f7f53a /usr.bin/diff/xmalloc.h
parentAllow ListenAddress, Port and AddressFamily in any order. bz#68, (diff)
downloadwireguard-openbsd-371275cabfe7ee71db4f4e23b9a5d966b335d3bc.tar.xz
wireguard-openbsd-371275cabfe7ee71db4f4e23b9a5d966b335d3bc.zip
Change internal xrealloc() to a idiom-following xreallocarray().
This loses a "new size is 0" failure case. Probably not relevant; and since we develop this in OpenBSD, we'll catch that before someone else imports this... ok millert
Diffstat (limited to 'usr.bin/diff/xmalloc.h')
-rw-r--r--usr.bin/diff/xmalloc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/diff/xmalloc.h b/usr.bin/diff/xmalloc.h
index f348ba23c33..d4aa769f552 100644
--- a/usr.bin/diff/xmalloc.h
+++ b/usr.bin/diff/xmalloc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: xmalloc.h,v 1.2 2009/06/07 08:39:13 ray Exp $ */
+/* $OpenBSD: xmalloc.h,v 1.3 2015/04/29 04:00:25 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -21,7 +21,7 @@
void *xmalloc(size_t);
void *xcalloc(size_t, size_t);
-void *xrealloc(void *, size_t, size_t);
+void *xreallocarray(void *, size_t, size_t);
void xfree(void *);
char *xstrdup(const char *);
int xasprintf(char **, const char *, ...)