=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/pigs.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- src/usr.bin/systat/pigs.c 2007/02/25 18:21:24 1.20 +++ src/usr.bin/systat/pigs.c 2007/09/02 15:19:35 1.21 @@ -1,4 +1,4 @@ -/* $OpenBSD: pigs.c,v 1.20 2007/02/25 18:21:24 deraadt Exp $ */ +/* $OpenBSD: pigs.c,v 1.21 2007/09/02 15:19:35 deraadt Exp $ */ /* $NetBSD: pigs.c,v 1.3 1995/04/29 05:54:50 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pigs.c 8.2 (Berkeley) 9/23/93"; #endif -static char rcsid[] = "$OpenBSD: pigs.c,v 1.20 2007/02/25 18:21:24 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: pigs.c,v 1.21 2007/09/02 15:19:35 deraadt Exp $"; #endif /* not lint */ /* @@ -181,8 +181,7 @@ } if (nproc > lastnproc) { free(pt); - if ((pt = - malloc((nproc + 1) * sizeof(struct p_times))) == NULL) { + if ((pt = calloc(nproc + 1, sizeof(struct p_times))) == NULL) { error("Out of memory"); die(); }