summaryrefslogtreecommitdiff
path: root/usr.bin/mklocale
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mklocale')
-rw-r--r--usr.bin/mklocale/yacc.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y
index e3bc5c47f34..430256ffe38 100644
--- a/usr.bin/mklocale/yacc.y
+++ b/usr.bin/mklocale/yacc.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: yacc.y,v 1.5 2012/12/05 23:20:25 deraadt Exp $ */
+/* $OpenBSD: yacc.y,v 1.6 2014/10/14 15:35:40 deraadt Exp $ */
/* $NetBSD: yacc.y,v 1.24 2004/01/05 23:23:36 jmmv Exp $ */
%{
@@ -311,7 +311,7 @@ xmalloc(size_t sz)
u_int32_t *
xlalloc(size_t sz)
{
- u_int32_t *r = (u_int32_t *)malloc(sz * sizeof(u_int32_t));
+ u_int32_t *r = (u_int32_t *)reallocarray(NULL, sz, sizeof(u_int32_t));
if (!r) {
perror("xlalloc");
abort();
@@ -322,7 +322,7 @@ xlalloc(size_t sz)
u_int32_t *
xrelalloc(u_int32_t *old, size_t sz)
{
- u_int32_t *r = (u_int32_t *)realloc(old, sz * sizeof(u_int32_t));
+ u_int32_t *r = (u_int32_t *)reallocarray(old, sz, sizeof(u_int32_t));
if (!r) {
perror("xrelalloc");
abort();