From: Hans Dedecker Date: Thu, 21 Dec 2017 10:56:32 +0000 (+0100) Subject: list: remove unncessary increment of n_section (FS#1182) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=25fd142c8dbed12354f544acbe08b3bf71075e53;p=oweals%2Fuci.git 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 --- 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); }