summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-06 20:55:10 +0000
committertedu <tedu@openbsd.org>2014-05-06 20:55:10 +0000
commitc0bbadaa955b15e5e2df03349bbb0e7d994c58b9 (patch)
tree6841df7351841d4a0872a7368c645e337ef67428
parentspell NULL as NULL (diff)
downloadwireguard-openbsd-c0bbadaa955b15e5e2df03349bbb0e7d994c58b9.tar.xz
wireguard-openbsd-c0bbadaa955b15e5e2df03349bbb0e7d994c58b9.zip
reallocarray
-rw-r--r--bin/ls/print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c
index 2889f515085..5b223303976 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.31 2014/01/09 03:07:52 guenther Exp $ */
+/* $OpenBSD: print.c,v 1.32 2014/05/06 20:55:10 tedu Exp $ */
/* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */
/*
@@ -174,7 +174,7 @@ printcol(DISPLAY *dp)
if (dp->entries > lastentries) {
FTSENT **a;
- if ((a = realloc(array, dp->entries * sizeof(FTSENT *))) ==
+ if ((a = reallocarray(array, dp->entries, sizeof(FTSENT *))) ==
NULL) {
free(array);
array = NULL;