syslog_rpmsg: update check method when do flush()
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
e56c8571dc
commit
45c04e9125
|
@ -347,7 +347,8 @@ int syslog_rpmsg_flush(FAR struct syslog_channel_s *channel)
|
|||
|
||||
flags = enter_critical_section();
|
||||
|
||||
if (priv->head - priv->flush > priv->size)
|
||||
if (priv->head > priv->flush &&
|
||||
priv->head - priv->flush > priv->size)
|
||||
{
|
||||
priv->flush = priv->tail;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue