From patchwork Tue Jun 7 10:11:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dbugnar X-Patchwork-Id: 631418 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rP6qS52gFz9s3T for ; Tue, 7 Jun 2016 20:14:12 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Ss8nGhrq; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAE0E-0005D9-6n; Tue, 07 Jun 2016 10:12:54 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAE0C-00056J-3d for lede-dev@lists.infradead.org; Tue, 07 Jun 2016 10:12:53 +0000 Received: by mail-wm0-x242.google.com with SMTP id k184so16466116wme.2 for ; Tue, 07 Jun 2016 03:12:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YYA+7YqmFW/GFDrcjoE7FjW8QRSdWWfTbO6GhnKLeMk=; b=Ss8nGhrqtM1ovX0Mdz3tlPZvAYTrpzRC+Q6LAhvjzyOCUVwQ8l8Lp0UxIQ//9BX63X U9akNfafZub1/rHWQnxQhJho1rL4r7d4hw0PRXwlYgF+u49PAcnRhbeu2abEDSnKwUqA gaFsALD7jfFkcf4MiXFhKyy6LAJj/9OFtVD4W6V/0ql7iBifR+55HVv2lNYLjL7psFnj RfEX2z18e7osOunnfMANiZxeahXFycApHRz/sUgS4eYyX3tofD6Eby74LzTUeyHDPX6t UnU/IHzbjQXphWISfWVx6FgpvGTHnTbIhk2NyOkb4FPeLo+CqZwLl6BAVeXGdkMt1E7o vy3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YYA+7YqmFW/GFDrcjoE7FjW8QRSdWWfTbO6GhnKLeMk=; b=AinwietA9k0HfmiR8A+kRi9DKoHqWuGYhUV0+mq2vDOoAqb4ulk4xWkpoOlX/fQSLC o578IqeU6CRakpW+zkr1LMpgHI9f3i48FP6E5jzFH0U1G/h1Z+fXpNrSdpX5eRh3altV 4s3f9Lnl8YKgIfjU6JYlZCnrzgPh/YTEBsVveNSTCCmD+ZpaM0/qWu19go/jhklNvrsW RJk/jSDcjGWiLtyrB6OGXZw1NODay6L5h5oe+6FtxlfWXTErC5asxmNEQ6yNYDwv00Qd +NobGt3VMEfUUYAurdNETUfJGuw3uY4ajFI+XC8qkNPjWew76ngLa3s0NALl0O5wR/m8 PrGA== X-Gm-Message-State: ALyK8tLhX/4hKQX1/gNAJzkGLjN/i8g0qnEuKeasMIPsCgx6bSwxK9fksw0evgDHMm/lsQ== X-Received: by 10.194.102.202 with SMTP id fq10mr19623288wjb.153.1465294350147; Tue, 07 Jun 2016 03:12:30 -0700 (PDT) Received: from localhost.localdomain ([5.2.198.78]) by smtp.gmail.com with ESMTPSA id a199sm5683479wma.2.2016.06.07.03.12.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jun 2016 03:12:29 -0700 (PDT) From: Dan Bugnar To: lede-dev@lists.infradead.org Date: Tue, 7 Jun 2016 13:11:14 +0300 Message-Id: <1465294276-15925-1-git-send-email-danutbug@gmail.com> X-Mailer: git-send-email 2.8.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160607_031252_326952_300A517A X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (danutbug[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [LEDE-DEV] [ubox] remove unnecessary size struct between messages X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dan Bugnar , Dan Bugnar MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Dan Bugnar 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 e8b6774..2042e93 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[size]; return (n >= log_end) ? (log) : (n); }