From 8d8d17e25d6c6a7d8c867e51c821b78d47dcfbea Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Tue, 27 Feb 2024 10:11:17 +0100 Subject: [PATCH] asc2log: remove fprint_canframe usage Signed-off-by: Oliver Hartkopp --- asc2log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/asc2log.c b/asc2log.c index 951835b..fb16db3 100644 --- a/asc2log.c +++ b/asc2log.c @@ -73,6 +73,8 @@ void print_usage(char *prg) void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, char *extra_info) { + static char abuf[BUFLEN]; + fprintf(file, "(%llu.%06llu) ", (unsigned long long)tv->tv_sec, (unsigned long long)tv->tv_usec); if (dev > 0) @@ -80,7 +82,8 @@ void prframe(FILE *file, struct timeval *tv, int dev, struct canfd_frame *cf, ch else fprintf(file, "canX "); - fprint_canframe(file, cf, extra_info, 0); + sprint_canframe(abuf, cf, 0); + fprintf(file, "%s%s", abuf, extra_info); } void get_can_id(struct canfd_frame *cf, char *idstring, int base) {