From 8ad191c1fecedf252a86246efb07df470d15afbc Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Mon, 14 Jan 2008 17:29:22 +0000 Subject: Changed xmalloc(n * m) pattern into xcalloc(n, m). OK ray@, xsa@ > Diff from Igor Zinovik. --- usr.bin/cvs/rcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 78d7781aca2..d39bb30b787 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.238 2008/01/13 11:11:08 tobias Exp $ */ +/* $OpenBSD: rcs.c,v 1.239 2008/01/14 17:29:21 tobias Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -2945,7 +2945,7 @@ rcs_annotate_getlines(RCSFILE *rfp, RCSNUM *frev, struct cvs_line ***alines) if (line->l_line != NULL) i++; } - *alines = xmalloc((i + 1) * sizeof(struct cvs_line *)); + *alines = xcalloc(i + 1, sizeof(struct cvs_line *)); (*alines)[i] = NULL; i = 0; -- cgit v1.2.3