提交 4f342456 编写于 作者: 还_没_想_好's avatar 还_没_想_好 提交者: guo

[ulog] Optimize unnecessary refresh

上级 9ebe0f3b
......@@ -79,11 +79,10 @@ static void ulog_file_backend_flush_with_buf(struct ulog_backend *backend)
struct ulog_file_be *be = (struct ulog_file_be *) backend;
rt_size_t file_size = 0, write_size = 0;
if (be->enable == RT_FALSE)
if (be->enable == RT_FALSE || be->buf_ptr_now == be->file_buf)
{
return;
}
if (be->cur_log_file_fd < 0)
{
/* check log file directory */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册