diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2009-02-07 17:51:23 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2009-02-07 17:51:23 +0000 |
commit | ccf851b82c95acd3caeaf5a839e836cc063df1e8 (patch) | |
tree | f7dad231abffcad7763c26e0f1d67edb3147bc64 /usr.bin/pr | |
parent | 9e5582dcc3d399c66d0e79e043c95608c39fb6b9 (diff) |
malloc(n * m) -> calloc(n, m);
ok ray@ moritz@
Diffstat (limited to 'usr.bin/pr')
-rw-r--r-- | usr.bin/pr/pr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/pr/pr.c b/usr.bin/pr/pr.c index 29c01f53dd2..d8f373b7441 100644 --- a/usr.bin/pr/pr.c +++ b/usr.bin/pr/pr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pr.c,v 1.26 2008/04/18 20:18:21 tobias Exp $ */ +/* $OpenBSD: pr.c,v 1.27 2009/02/07 17:51:22 chl Exp $ */ /*- * Copyright (c) 1991 Keith Muller. @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93"; */ -static char *rcsid = "$OpenBSD: pr.c,v 1.26 2008/04/18 20:18:21 tobias Exp $"; +static char *rcsid = "$OpenBSD: pr.c,v 1.27 2009/02/07 17:51:22 chl Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -376,7 +376,7 @@ vertcol(int argc, char *argv[]) /* * allocate page buffer */ - if ((buf = malloc((unsigned)lines*mxlen)) == NULL) { + if ((buf = calloc((unsigned)lines, mxlen)) == NULL) { mfail(); return(1); } |