summaryrefslogtreecommitdiff
path: root/usr.sbin/rtsold
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 04:55:28 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-10-08 04:55:28 +0000
commite67e68ff6c036e6362bcd259a75220fb871f29c7 (patch)
tree7a0800eb7623c2d73f016285e642c2a824f8fcfd /usr.sbin/rtsold
parent52219b1212db986e1c85b8cf38bf9a619a9f1d27 (diff)
obvious realloc() -> reallocarray() conversions
ok doug
Diffstat (limited to 'usr.sbin/rtsold')
-rw-r--r--usr.sbin/rtsold/rtsold.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index 7ed8fca84d1..de88466bbc6 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsold.c,v 1.53 2014/08/27 14:04:16 florian Exp $ */
+/* $OpenBSD: rtsold.c,v 1.54 2014/10/08 04:55:27 deraadt Exp $ */
/* $KAME: rtsold.c,v 1.75 2004/01/03 00:00:07 itojun Exp $ */
/*
@@ -737,7 +737,7 @@ autoifprobe(u_int rdomain)
if (n != 0 && dflag > 1)
warnx("multiple interfaces found");
- a = (char **)realloc(argv, (n + 1) * sizeof(char **));
+ a = reallocarray(argv, n + 1, sizeof(char **));
if (a == NULL)
err(1, "realloc");
argv = a;
@@ -747,7 +747,7 @@ autoifprobe(u_int rdomain)
}
if (n) {
- a = (char **)realloc(argv, (n + 1) * sizeof(char **));
+ a = reallocarray(argv, n + 1, sizeof(char **));
if (a == NULL)
err(1, "realloc");
argv = a;