From 15d3129ea3876e23d3b8dafc68463cfdbd5ada42 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch 
Date: Sun, 5 Jul 2015 18:26:46 +0200
Subject: degesch: mark all unrecognized config values
---
 degesch.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/degesch.c b/degesch.c
index bfaf9ea..c6e2d0c 100644
--- a/degesch.c
+++ b/degesch.c
@@ -6223,27 +6223,27 @@ config_dump_item (struct config_item_ *item, struct config_dump_data *data)
 	for (; iter; iter = iter->next)
 		str_append_printf (&line, ".%s", iter->name);
 
+	struct str value;
+	str_init (&value);
+	config_item_write (item, false, &value);
+
 	// Don't bother writing out null values everywhere
 	struct config_schema *schema = item->schema;
 	bool has_default = schema && schema->default_;
 	if (item->type != CONFIG_ITEM_NULL || has_default)
 	{
 		str_append (&line, " = ");
-
-		struct str value;
-		str_init (&value);
-		config_item_write (item, false, &value);
 		str_append_str (&line, &value);
-
-		if (!schema)
-			str_append (&line, " (unrecognized)");
-		else if (has_default && strcmp (schema->default_, value.str))
-			str_append_printf (&line, " (default: %s)", schema->default_);
-		else if (!has_default && item->type != CONFIG_ITEM_NULL)
-			str_append_printf (&line, " (default: %s)", "null");
-		str_free (&value);
 	}
 
+	if (!schema)
+		str_append (&line, " (unrecognized)");
+	else if (has_default && strcmp (schema->default_, value.str))
+		str_append_printf (&line, " (default: %s)", schema->default_);
+	else if (!has_default && item->type != CONFIG_ITEM_NULL)
+		str_append_printf (&line, " (default: %s)", "null");
+
+	str_free (&value);
 	str_vector_add_owned (data->output, str_steal (&line));
 }
 
-- 
cgit v1.2.3-70-g09d2