From 7bac71530376f7b7482fabd6af3051f387be01cd Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 28 Jan 2008 04:37:11 +0100 Subject: [PATCH] add missing check --- file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index e9a8f90..772cf25 100644 --- a/file.c +++ b/file.c @@ -463,7 +463,8 @@ static void uci_export_package(struct uci_package *p, FILE *stream, bool header) struct uci_context *ctx = p->ctx; struct uci_element *s, *o; - fprintf(stream, "package '%s'\n", uci_escape(ctx, p->e.name)); + if (header) + fprintf(stream, "package '%s'\n", uci_escape(ctx, p->e.name)); uci_foreach_element(&p->sections, s) { struct uci_section *sec = uci_to_section(s); fprintf(stream, "\nconfig '%s'", uci_escape(ctx, sec->type)); -- 2.41.1