syslog: remove unsed check
To simplify the code Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
904ca21a00
commit
b743d62703
|
@ -275,7 +275,7 @@ static void ramlog_initbuf(void)
|
|||
prev = cur;
|
||||
}
|
||||
|
||||
if (i != priv->rl_bufsize || is_empty)
|
||||
if (is_empty)
|
||||
{
|
||||
priv->rl_head = priv->rl_tail = 0;
|
||||
}
|
||||
|
|
|
@ -392,6 +392,7 @@ void syslog_rpmsg_init_early(FAR void *buffer, size_t size)
|
|||
struct boardioc_reset_cause_s cause;
|
||||
int ret;
|
||||
#endif
|
||||
bool is_empty = true;
|
||||
char prev;
|
||||
char cur;
|
||||
size_t i;
|
||||
|
@ -425,6 +426,7 @@ void syslog_rpmsg_init_early(FAR void *buffer, size_t size)
|
|||
else if (prev && !cur)
|
||||
{
|
||||
priv->head = i;
|
||||
is_empty = false;
|
||||
}
|
||||
else if (!prev && cur)
|
||||
{
|
||||
|
@ -434,7 +436,7 @@ void syslog_rpmsg_init_early(FAR void *buffer, size_t size)
|
|||
prev = cur;
|
||||
}
|
||||
|
||||
if (i != size)
|
||||
if (is_empty)
|
||||
{
|
||||
priv->head = priv->tail = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue