Message ID | 1513853792-15138-2-git-send-email-dedeckeh@gmail.com |
---|---|
State | Accepted |
Delegated to: | Hans Dedecker |
Headers | show
Return-Path: <lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZksbJqjH"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="i7PYccZl"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3z2T9r2kHPz9s83 for <incoming@patchwork.ozlabs.org>; Thu, 21 Dec 2017 21:57:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JZNpbnpj4U6p+djZ2zc9FsPTqJHYKrs3WUGzr78/eac=; b=ZksbJqjHWSPOVM 0vJmdVuEahA/Usg/LTsEkd5zUrpaaCa8JC19oXWkV6NdlNH0k4rkI0ApOu4frmDhAV6KJlg8VIwOB CgmCpbNmFq8XMyAm9Pl3RZwVyf4m7yIr3Jr7HWejK8H8HLsc/5w369376c1X0ooPaml/V6VfILsas z2EeCVeAmof2Mx4KVhPp1R57fKi7CUw7Kg8UjnZJB7xmVQFiySdtFHRzAaue72QNI+SdMg1S+ePk4 9lkrlqMHRjhKFNG0/7uTyzCkGKuPYt+YWGxiYhmDQqD6e91yZm+xSPJ1s5vzre8+i3pGgV8pA0x1t 0QUg4w/00bDPKNiW96Eg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eRyXC-0003Bw-IA; Thu, 21 Dec 2017 10:57:06 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eRyWx-00031l-5m for lede-dev@lists.infradead.org; Thu, 21 Dec 2017 10:56:52 +0000 Received: by mail-wr0-x242.google.com with SMTP id u19so18425878wrc.3 for <lede-dev@lists.infradead.org>; Thu, 21 Dec 2017 02:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Espkyn7SsvMSttHHWetixaNmXNVFSpJbzN6TME6olwQ=; b=i7PYccZlHu66gwCLlGgHXirHlv9GyUuUCpDbIQNs3s58LEurq5Gka0KetUeYBQeOtS KXD7v/ELOn6sP6PvhX4jr+2ntnL4cZFcPaJmYryz4HCu81q1XE+ziekuipoSZmk1ToBm xY5TmzpWI/b2XYoj90QQxI/6wSWxylk6z2k4Ozh5RpQPL4Do0TtCF70a2QYIeQlODLcQ IFflMTGOyu13UiEmSJerNFdvYReLSSUIxP0H+NZORYnowlMvx8L6Y7VLjiqaJdSiPhj3 dw597Q5VQnGmxCbHN+bLzl/zHLgYAgrSm6+s1PVcDyrZnWm3PE6P75cWCKF5FV/yaTaF d/Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Espkyn7SsvMSttHHWetixaNmXNVFSpJbzN6TME6olwQ=; b=KM8v9bc1ovj3EBYCFpqnRgvKoz9oZnL3t/VXcH7HK5M6r1WOQrxV4hzdBst2UFGCUm FevAN9myE/FKISvGdf6GRXF7jjztPUn+WhK8x4R1ZsUeF6iVpLWIkuKYjtOsTY5H1mv+ UHCdAuyg1eWL1o/na89kLyQiW/Wo3ZUbwMDZxS0YxXpRS8RFlG9xuTtuyRfjDGv2Sg3Y Y4VsZgsZcs5lZCxPzY/Zswt975TdrrD86gvfpYNY+JhNb2LKctu7FHIiaA4kPZqZd1xj puovut6jYFX52yFXtSkeVDn0s1NwKQ05/Pow3jQCWduYjPugkJhCJOflSRp7pew7pyUJ NbwQ== X-Gm-Message-State: AKGB3mKt78+7pog0NosWcK4iFZbHIRCiIUEzsEX29M6ZLoQ+Blgudic2 paLhT87JgmJ+oNCapW2RFwo= X-Google-Smtp-Source: ACJfBosPXnsJmO3v+Ni6sPScNv57CSWpwj9Wvw4IGv4i5cLQaFdYwBIayMlbfTDwXEaXWmXkZS06Eg== X-Received: by 10.223.161.208 with SMTP id v16mr9425476wrv.103.1513853799334; Thu, 21 Dec 2017 02:56:39 -0800 (PST) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by smtp.gmail.com with ESMTPSA id 31sm7684300wrm.59.2017.12.21.02.56.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Dec 2017 02:56:38 -0800 (PST) From: Hans Dedecker <dedeckeh@gmail.com> To: nbd@nbd.name, lede-dev@lists.infradead.org Date: Thu, 21 Dec 2017 11:56:32 +0100 Message-Id: <1513853792-15138-2-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1513853792-15138-1-git-send-email-dedeckeh@gmail.com> References: <1513853792-15138-1-git-send-email-dedeckeh@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171221_025651_315094_BDDD0FC9 X-CRM114-Status: UNSURE ( 7.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c0c: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 (dedeckeh[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 Subject: [LEDE-DEV] [PATCH uci 2/2] list: remove unncessary increment of n_section (FS#1182) X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <lede-dev.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/lede-dev>, <mailto:lede-dev-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/lede-dev/> List-Post: <mailto:lede-dev@lists.infradead.org> List-Help: <mailto:lede-dev-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/lede-dev>, <mailto:lede-dev-request@lists.infradead.org?subject=subscribe> Cc: Hans Dedecker <dedeckeh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Lede-dev" <lede-dev-bounces@lists.infradead.org> Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[LEDE-DEV,uci,1/2] file: remove unnecessary uci_fixup_section calls
|
expand
|
diff --git a/list.c b/list.c index e78012b..0347138 100644 --- a/list.c +++ b/list.c @@ -175,7 +175,7 @@ static void uci_fixup_section(struct uci_context *ctx, struct uci_section *s) break; } } - sprintf(buf, "cfg%02x%04x", ++s->package->n_section, hash % (1 << 16)); + sprintf(buf, "cfg%02x%04x", s->package->n_section, hash % (1 << 16)); s->e.name = uci_strdup(ctx, buf); }
The package n_section counter is already incremented in uci_alloc_section; so no need to increment it again in uci_fixup_section. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> --- Output of uci -n export foo before the fix package foo config foo 'cfg027389' config foo 'cfg047389' config bar 'cfg0660ba' config bar 'cfg0860ba' after the fix package foo config foo 'cfg017389' config foo 'cfg027389' config bar 'cfg0360ba' config bar 'cfg0460ba' list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)