From 25fd142c8dbed12354f544acbe08b3bf71075e53 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 21 Dec 2017 11:56:32 +0100 Subject: [PATCH] list: remove unncessary increment of n_section (FS#1182) 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 --- list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.11.0