From e52ae7d7cb3b9267a450ee786b056b14391f2f50 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 2 Mar 1999 06:23:57 +0000 Subject: ncurses-4.2-990301 --- lib/libcurses/trace/trace_buf.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/libcurses/trace/trace_buf.c') diff --git a/lib/libcurses/trace/trace_buf.c b/lib/libcurses/trace/trace_buf.c index 11117c5326b..4e0ed6ce21e 100644 --- a/lib/libcurses/trace/trace_buf.c +++ b/lib/libcurses/trace/trace_buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trace_buf.c,v 1.1 1999/01/18 19:10:25 millert Exp $ */ +/* $OpenBSD: trace_buf.c,v 1.2 1999/03/02 06:23:29 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -37,7 +37,7 @@ #include -MODULE_ID("$From: trace_buf.c,v 1.6 1998/08/15 23:37:25 tom Exp $") +MODULE_ID("$From: trace_buf.c,v 1.7 1999/02/27 19:50:58 tom Exp $") typedef struct { char *text; @@ -63,8 +63,7 @@ char * _nc_trace_buf(int bufnum, size_t want) if ((size_t)(bufnum+1) > have) { size_t need = (bufnum + 1) * 2; - size_t used = sizeof(*list) * need; - if ((list = (LIST *)_nc_doalloc(list, used)) == 0) + if ((list = typeRealloc(LIST, need, list)) == 0) return(0); while (need > have) list[have++].text = 0; @@ -73,7 +72,7 @@ char * _nc_trace_buf(int bufnum, size_t want) if (list[bufnum].text == 0 || want > list[bufnum].size) { - if ((list[bufnum].text = (char *)_nc_doalloc(list[bufnum].text, want)) != 0) + if ((list[bufnum].text = typeRealloc(char, want, list[bufnum].text)) != 0) list[bufnum].size = want; } -- cgit v1.2.3