summaryrefslogtreecommitdiff
path: root/usr.bin/systat/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/systat/if.c')
-rw-r--r--usr.bin/systat/if.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/systat/if.c b/usr.bin/systat/if.c
index 975a513a4b7..9f83ad943b1 100644
--- a/usr.bin/systat/if.c
+++ b/usr.bin/systat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.21 2014/06/23 03:46:16 guenther Exp $ */
+/* $OpenBSD: if.c,v 1.22 2014/10/08 04:10:04 doug Exp $ */
/*
* Copyright (c) 2004 Markus Friedl <markus@openbsd.org>
*
@@ -217,8 +217,8 @@ fetchifstat(void)
!(ifm.ifm_addrs & RTA_IFP))
continue;
if (ifm.ifm_index >= nifs) {
- if ((newstats = realloc(ifstats, (ifm.ifm_index + 4)
- * sizeof(struct ifstat))) == NULL)
+ if ((newstats = reallocarray(ifstats, ifm.ifm_index + 4,
+ sizeof(struct ifstat))) == NULL)
continue;
ifstats = newstats;
for (; nifs < ifm.ifm_index + 4; nifs++)