Browse Source

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 <dedeckeh@gmail.com>
Hans Dedecker 6 years ago
parent
commit
25fd142c8d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      list.c

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