aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/bc
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2017-03-05 16:10:35 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2017-03-05 16:10:35 +0000
commit63433bc937051f84486b603e9803597db68f796b (patch)
tree3b85912a1a98333288adba4e1610a49447f3a2f2 /usr.bin/bc
parentd457839bc81ca7d922661f349b8b9a0e3fe13238 (diff)
downloadsrc-63433bc937051f84486b603e9803597db68f796b.tar.gz
src-63433bc937051f84486b603e9803597db68f796b.zip
Notes
Diffstat (limited to 'usr.bin/bc')
-rw-r--r--usr.bin/bc/bc.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/bc/bc.y b/usr.bin/bc/bc.y
index 17f308edf690..50ac130b461c 100644
--- a/usr.bin/bc/bc.y
+++ b/usr.bin/bc/bc.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: bc.y,v 1.44 2013/11/20 21:33:54 deraadt Exp $ */
+/* $OpenBSD: bc.y,v 1.46 2014/10/14 15:35:18 deraadt Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -771,7 +771,7 @@ grow(void)
if (current == instr_sz) {
newsize = instr_sz * 2 + 1;
- p = realloc(instructions, newsize * sizeof(*p));
+ p = reallocarray(instructions, newsize, sizeof(*p));
if (p == NULL) {
free(instructions);
err(1, NULL);
@@ -1132,7 +1132,7 @@ main(int argc, char *argv[])
init();
setvbuf(stdout, NULL, _IOLBF, 0);
- sargv = malloc(argc * sizeof(char *));
+ sargv = reallocarray(NULL, argc, sizeof(char *));
if (sargv == NULL)
err(1, NULL);