summaryrefslogtreecommitdiff
path: root/usr.bin/tput
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tput')
-rw-r--r--usr.bin/tput/tput.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c
index 9470469db0f..84bafe6e787 100644
--- a/usr.bin/tput/tput.c
+++ b/usr.bin/tput/tput.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tput.c,v 1.19 2013/11/27 15:23:01 yasuoka Exp $ */
+/* $OpenBSD: tput.c,v 1.20 2014/10/08 04:10:47 doug Exp $ */
/*
* Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -126,7 +126,8 @@ main(int argc, char *argv[])
/* grow av as needed */
if (argc + 1 >= n) {
n += 64;
- av = (char **)realloc(av, sizeof(char *) * n);
+ av = reallocarray(av, n,
+ sizeof(char *));
if (av == NULL)
errx(1, "out of memory");
}