Merge "liblog: fix reading pmsg"

This commit is contained in:
Tom Cherry 2020-06-17 18:15:28 +00:00 committed by Gerrit Code Review
commit a6dd55737a
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ int PmsgRead(struct logger_list* logger_list, struct log_msg* log_msg) {
((logger_list->start.tv_sec != buf.l.realtime.tv_sec) ||
(logger_list->start.tv_nsec <= buf.l.realtime.tv_nsec)))) &&
(!logger_list->pid || (logger_list->pid == buf.p.pid))) {
char* msg = reinterpret_cast<char*>(&log_msg->entry) + log_msg->entry.hdr_size;
char* msg = reinterpret_cast<char*>(&log_msg->entry) + sizeof(log_msg->entry);
*msg = buf.prio;
fd = atomic_load(&logger_list->fd);
if (fd <= 0) {