From: Felix Fietkau Date: Mon, 28 Jan 2008 03:37:11 +0000 (+0100) Subject: add missing check X-Git-Url: http://pilppa.org/gitweb/?a=commitdiff_plain;h=7bac71530376f7b7482fabd6af3051f387be01cd;p=uci.git add missing check --- 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));