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>
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);
}