summaryrefslogtreecommitdiff
path: root/bin/ksh/main.c
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-11-01 15:38:54 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-11-01 15:38:54 +0000
commit2f377d9b3cef15535c39e411dac8e412ba13c38b (patch)
treee80195ce23082663928aafb335cafd2cfb874610 /bin/ksh/main.c
parentff59124a026dd748c9d9f8ac96bb13115364103b (diff)
Add uses of areallocarray(). mksh and Bitrig ksh already have similar
functions. With help from Theo Buehler. ok nicm@
Diffstat (limited to 'bin/ksh/main.c')
-rw-r--r--bin/ksh/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/main.c b/bin/ksh/main.c
index 410a0ee4dc6..301f6666de2 100644
--- a/bin/ksh/main.c
+++ b/bin/ksh/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.72 2015/10/30 03:13:52 guenther Exp $ */
+/* $OpenBSD: main.c,v 1.73 2015/11/01 15:38:53 mmcc Exp $ */
/*
* startup, main loop, environments and error handling
@@ -125,7 +125,7 @@ make_argv(int argc, char *argv[])
char **nargv = argv;
if (strcmp(argv[0], kshname) != 0) {
- nargv = alloc(sizeof(char *) * (argc + 1), &aperm);
+ nargv = areallocarray(NULL, argc + 1, sizeof(char *), &aperm);
nargv[0] = (char *) kshname;
for (i = 1; i < argc; i++)
nargv[i] = argv[i];