summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Bugnar <danutbug@gmail.com>2017-03-10 12:06:29 +0200
committerFelix Fietkau <nbd@nbd.name>2017-03-10 12:04:29 +0100
commit16f7e16181e2f3e9cf3e2ce56a7e291844900d09 (patch)
tree028ca6cf19b6ce58959b88c2d865c12413d7d31f
parent21a4bd04062e16164f4f3e1c67005a062f470b0c (diff)
downloadubox-16f7e16181e2f3e9cf3e2ce56a7e291844900d09.tar.gz
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 <danutbug@gmail.com>
-rw-r--r--log/syslog.c2
1 files changed, 1 insertions, 1 deletions
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);
}