Update elog_buf.c

pull/81/head
book诗意 5 years ago committed by GitHub
parent a29872cc71
commit f5918ab647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,16 +82,16 @@ void elog_buf_output(const char *log, size_t size) {
* flush all buffered logs to output device
*/
void elog_flush(void) {
if(buf_write_size){
/* lock output */
elog_output_lock();
/* output log */
elog_port_output(log_buf, buf_write_size);
/* reset write index */
buf_write_size = 0;
/* unlock output */
elog_output_unlock();
}
if(!buf_write_size)
return;
/* lock output */
elog_output_lock();
/* output log */
elog_port_output(log_buf, buf_write_size);
/* reset write index */
buf_write_size = 0;
/* unlock output */
elog_output_unlock();
}
/**

Loading…
Cancel
Save