summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-05-29 16:39:43 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-05-29 16:39:43 +0000
commitac879c7efaee8caff7c680d3e2c3dfb9913ba90f (patch)
treefee79218d1807f7f514a9a36aceb70fdbf4c8145 /usr.bin
parent8ca247aae74e09e6ab0c9565863007e3a16095cd (diff)
use calloc, from Benjamin Baier
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rcs/rcsutil.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/rcs/rcsutil.c b/usr.bin/rcs/rcsutil.c
index 12de69af501..473adab149a 100644
--- a/usr.bin/rcs/rcsutil.c
+++ b/usr.bin/rcs/rcsutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsutil.c,v 1.39 2013/04/16 20:24:45 deraadt Exp $ */
+/* $OpenBSD: rcsutil.c,v 1.40 2014/05/29 16:39:42 tedu Exp $ */
/*
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -479,12 +479,10 @@ rcs_splitlines(u_char *data, size_t len)
struct rcs_line *lp;
size_t i, tlen;
- lines = xmalloc(sizeof(*lines));
- memset(lines, 0, sizeof(*lines));
+ lines = xcalloc(1, sizeof(*lines));
TAILQ_INIT(&(lines->l_lines));
- lp = xmalloc(sizeof(*lp));
- memset(lp, 0, sizeof(*lp));
+ lp = xcalloc(1, sizeof(*lp));
TAILQ_INSERT_TAIL(&(lines->l_lines), lp, l_list);