From 2af5e6aaaa6de7b934ecc2241d85743155a209eb Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Fri, 1 Mar 2024 15:56:21 +0100 Subject: [PATCH] canlogserver/log2long: make CAN XL ASCII buffer static Signed-off-by: Oliver Hartkopp --- canlogserver.c | 2 +- log2long.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/canlogserver.c b/canlogserver.c index ef6f943..cdd25d5 100644 --- a/canlogserver.c +++ b/canlogserver.c @@ -201,7 +201,7 @@ int main(int argc, char **argv) struct sockaddr_in inaddr; struct sockaddr_in clientaddr; socklen_t sin_size = sizeof(clientaddr); - char afrbuf[AFRSZ]; + static char afrbuf[AFRSZ]; sigemptyset(&sigset); signalaction.sa_handler = &childdied; diff --git a/log2long.c b/log2long.c index 0fcb0cc..731d29a 100644 --- a/log2long.c +++ b/log2long.c @@ -67,7 +67,7 @@ int main(void) { - char buf[BUFSZ], timestamp[TIMESZ], device[DEVSZ], afrbuf[AFRSZ]; + static char buf[BUFSZ], timestamp[TIMESZ], device[DEVSZ], afrbuf[AFRSZ]; static cu_t cu; int mtu;