FreeCalypso > hg > freecalypso-tools
changeset 929:ab771ce34fac
rvinterf/lowlevel/format.c: get rid of static fmtbuf
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 23 May 2023 05:56:08 +0000 |
parents | 65953c172f24 |
children | a38430e03e73 |
files | rvinterf/lowlevel/format.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/rvinterf/lowlevel/format.c Tue May 23 05:23:19 2023 +0000 +++ b/rvinterf/lowlevel/format.c Tue May 23 05:56:08 2023 +0000 @@ -16,15 +16,13 @@ extern void output_cont(); -static char fmtbuf[MAX_PKT_FROM_TARGET*8]; /* size it generously */ - void print_rv_trace() { int i; - char *dp; + char fmtbuf[MAX_PKT_FROM_TARGET*4]; + char *dp = fmtbuf; - dp = fmtbuf; strcpy(dp, "RV "); dp += 3; /* the SWE static ID is sent MSB first */ @@ -43,9 +41,9 @@ print_l1_trace() { int i, c; - char *dp; + char fmtbuf[MAX_PKT_FROM_TARGET*4+1]; + char *dp = fmtbuf; - dp = fmtbuf; strcpy(dp, "L1: "); dp += 4; for (i = 1; i < rxpkt_len; i++) { @@ -95,6 +93,8 @@ void print_g23_trace() { + char fmtbuf[MAX_PKT_FROM_TARGET*8]; /* size it generously */ + /* messy logic factored out into libg23 */ format_g23_packet(rxpkt, (int)rxpkt_len, fmtbuf); output_line(fmtbuf);