From: Dan Bugnar Date: Fri, 10 Mar 2017 10:06:29 +0000 (+0200) Subject: syslog: remove unnecessary sizeof struct between messages X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=16f7e16181e2f3e9cf3e2ce56a7e291844900d09;p=project%2Fubox.git syslog: remove unnecessary sizeof struct between messages The next message needs to be written after the data of current message. This was adding "sizeof(struct log_head)" bytes between messages. Signed-off-by: Dan Bugnar --- diff --git a/log/syslog.c b/log/syslog.c index ac4f1ae..856fa60 100644 --- a/log/syslog.c +++ b/log/syslog.c @@ -51,7 +51,7 @@ static regex_t pat_tstamp; static struct log_head* log_next(struct log_head *h, int size) { - struct log_head *n = (struct log_head *) &h->data[PAD(sizeof(struct log_head) + size)]; + struct log_head *n = (struct log_head *) &h->data[PAD(size)]; return (n >= log_end) ? (log) : (n); }