diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-09-10 13:55:44 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-09-10 13:55:44 +0000 |
commit | 3150625201d9c293e5c34b19b8a2d48a27da5f07 (patch) | |
tree | 4b83d615adb9f3870c56fd4e3caf62956df0f12c /hist.c | |
parent | 8c36b0434ca4a5ba6df2724542048eb219af7a34 (diff) |
Notes
Diffstat (limited to 'hist.c')
-rw-r--r-- | hist.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $NetBSD: hist.c,v 1.32 2017/03/05 19:23:58 christos Exp $ */ +/* $NetBSD: hist.c,v 1.34 2019/07/23 10:19:35 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: hist.c,v 1.32 2017/03/05 19:23:58 christos Exp $"); +__RCSID("$NetBSD: hist.c,v 1.34 2019/07/23 10:19:35 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -59,10 +59,10 @@ hist_init(EditLine *el) el->el_history.fun = NULL; el->el_history.ref = NULL; - el->el_history.buf = el_malloc(EL_BUFSIZ * sizeof(*el->el_history.buf)); - el->el_history.sz = EL_BUFSIZ; + el->el_history.buf = el_calloc(EL_BUFSIZ, sizeof(*el->el_history.buf)); if (el->el_history.buf == NULL) return -1; + el->el_history.sz = EL_BUFSIZ; el->el_history.last = el->el_history.buf; return 0; } |