mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
syslog/ramlog: write zero for the overwrite area
N/A Change-Id: I8f8d8c53e77ee9d916cb97ea7cd3e988fbbe9ad2 Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com> (cherry picked from commit 4d8124a28048ea7ba7717d999553028e5384d631)
This commit is contained in:
@@ -236,6 +236,7 @@ static ssize_t ramlog_addchar(FAR struct ramlog_dev_s *priv, char ch)
|
||||
#ifdef CONFIG_RAMLOG_OVERWRITE
|
||||
/* Yes... Overwrite with the latest log in the circular buffer */
|
||||
|
||||
priv->rl_buffer[priv->rl_tail] = '\0';
|
||||
priv->rl_tail += 1;
|
||||
if (priv->rl_tail >= priv->rl_bufsize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user