From 16f7e16181e2f3e9cf3e2ce56a7e291844900d09 Mon Sep 17 00:00:00 2001 From: Dan Bugnar Date: Fri, 10 Mar 2017 12:06:29 +0200 Subject: [PATCH] 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 --- log/syslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.11.0