diff options
Diffstat (limited to 'usr.bin/cvs/hist.c')
-rw-r--r-- | usr.bin/cvs/hist.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/cvs/hist.c b/usr.bin/cvs/hist.c index 1bf36d3f050..93dbf1fe5be 100644 --- a/usr.bin/cvs/hist.c +++ b/usr.bin/cvs/hist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hist.c,v 1.13 2006/01/02 08:11:56 xsa Exp $ */ +/* $OpenBSD: hist.c,v 1.14 2006/04/05 01:38:55 ray Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -48,10 +48,9 @@ cvs_hist_open(const char *path) { CVSHIST *histp; - histp = (CVSHIST *)xmalloc(sizeof(*histp)); - memset(histp, 0, sizeof(*histp)); + histp = xcalloc(1, sizeof(*histp)); - histp->chf_buf = (char *)xmalloc((size_t)CVS_HIST_BUFSIZE); + histp->chf_buf = xmalloc((size_t)CVS_HIST_BUFSIZE); histp->chf_blen = CVS_HIST_BUFSIZE; histp->chf_off = 0; |