=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/if.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- src/usr.bin/systat/if.c 2014/06/23 03:46:16 1.21 +++ src/usr.bin/systat/if.c 2014/10/08 04:10:04 1.22 @@ -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 * @@ -217,8 +217,8 @@ !(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++)