From aca66c5ecaa88acf62564921aec003aa40a3b205 Mon Sep 17 00:00:00 2001
From: Jan Kadlec <jan.kadlec@nic.cz>
Date: Wed, 9 Apr 2014 17:08:17 +0200
Subject: [PATCH] new_node: Reused code for RRSet init.

---
 src/knot/zone/zone-create.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/knot/zone/zone-create.c b/src/knot/zone/zone-create.c
index 115db7ea92..3bbb18bd37 100644
--- a/src/knot/zone/zone-create.c
+++ b/src/knot/zone/zone-create.c
@@ -133,11 +133,8 @@ static void loader_process(const zs_scanner_t *scanner)
 	}
 	knot_dname_to_lower(owner);
 
-	knot_rrset_t rr = {.owner = owner,
-	                   .type = scanner->r_type,
-	                   .rclass = scanner->r_class,
-	                   .additional = NULL};
-	knot_rrs_init(&rr.rrs);
+	knot_rrset_t rr;
+	knot_rrset_init(&rr, owner, scanner->r_type, scanner->r_class);
 	int ret = add_rdata_to_rr(&rr, scanner);
 	if (ret != KNOT_EOK) {
 		char *rr_name = knot_dname_to_str(rr.owner);
-- 
GitLab