diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-09-03 14:26:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-09-03 14:26:55 +0000 |
commit | 11f3d60016d0a4de4014121ff35d6d1b7d6817bf (patch) | |
tree | 268c999137bbb23843a535f6191e5b115699170f /bin/ed/glbl.c | |
parent | 90562873806dad0660901e9b9d25801343dd0af8 (diff) |
malloc(n * m) -> calloc(n, m); ok espie
Diffstat (limited to 'bin/ed/glbl.c')
-rw-r--r-- | bin/ed/glbl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ed/glbl.c b/bin/ed/glbl.c index 8e9a5ea5734..d7862a31fd2 100644 --- a/bin/ed/glbl.c +++ b/bin/ed/glbl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glbl.c,v 1.10 2003/06/11 23:42:12 deraadt Exp $ */ +/* $OpenBSD: glbl.c,v 1.11 2007/09/03 14:26:54 deraadt Exp $ */ /* $NetBSD: glbl.c,v 1.2 1995/03/21 09:04:41 cgd Exp $ */ /* glob.c: This file contains the global command routines for the ed line @@ -33,7 +33,7 @@ #if 0 static char *rcsid = "@(#)glob.c,v 1.1 1994/02/01 00:34:40 alm Exp"; #else -static char rcsid[] = "$OpenBSD: glbl.c,v 1.10 2003/06/11 23:42:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: glbl.c,v 1.11 2007/09/03 14:26:54 deraadt Exp $"; #endif #endif /* not lint */ @@ -169,7 +169,7 @@ set_active_node(line_t *lp) } #if defined(sun) || defined(NO_REALLOC_NULL) } else { - if ((ts = (line_t **) malloc((ti += MINBUFSZ) * + if ((ts = (line_t **) calloc(ti += MINBUFSZ, sizeof(line_t **))) == NULL) { perror(NULL); seterrmsg("out of memory"); |