From 887c6c8716e1e05949e3217b9aa4546b2ac9a75e Mon Sep 17 00:00:00 2001 From: xucheng5 Date: Thu, 5 Sep 2024 15:40:58 +0800 Subject: [PATCH] syslogstream : init value for lib_syslograwstream_s.last_ch Signed-off-by: xucheng5 --- libs/libc/stream/lib_syslograwstream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/libc/stream/lib_syslograwstream.c b/libs/libc/stream/lib_syslograwstream.c index 68a23da340644..de99b9b9a3815 100644 --- a/libs/libc/stream/lib_syslograwstream.c +++ b/libs/libc/stream/lib_syslograwstream.c @@ -260,6 +260,7 @@ void lib_syslograwstream_open(FAR struct lib_syslograwstream_s *stream) stream->common.putc = syslograwstream_putc; stream->common.puts = syslograwstream_puts; stream->common.nput = 0; + stream->last_ch = '\0'; #ifdef CONFIG_SYSLOG_BUFFER stream->common.flush = syslograwstream_flush;