From cb4200a1c20a2dfaa2ae938be56e80df10a7ea5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 7 Jul 2017 13:16:41 +0200 Subject: [PATCH] utils: remove unused kr_rrarray_add(...) Noticed after removal of its lua binding in commit 3be76db7610. --- lib/utils.c | 14 -------------- lib/utils.h | 3 --- 2 files changed, 17 deletions(-) diff --git a/lib/utils.c b/lib/utils.c index 11cd293df..bc177a92c 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -454,20 +454,6 @@ int kr_rrmap_add(map_t *stash, const knot_rrset_t *rr, uint8_t rank, knot_mm_t * return knot_rdataset_merge(&stashed->rrs, &rr->rrs, pool); } -int kr_rrarray_add(rr_array_t *array, const knot_rrset_t *rr, knot_mm_t *pool) -{ - int ret = array_reserve_mm(*array, array->len + 1, kr_memreserve, pool); - if (ret != 0) { - return kr_error(ENOMEM); - } - knot_rrset_t *copy = knot_rrset_copy(rr, pool); - if (!copy) { - return kr_error(ENOMEM); - } - array_push(*array, copy); - return kr_ok(); -} - /** Return whether two RRsets match, i.e. would form the same set; see ranked_rr_array_t */ static inline bool rrsets_match(const knot_rrset_t *rr1, const knot_rrset_t *rr2) { diff --git a/lib/utils.h b/lib/utils.h index 90412fce3..3cbf989bd 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -238,9 +238,6 @@ int kr_rrkey(char *key, const knot_dname_t *owner, uint16_t type, uint8_t rank); */ int kr_rrmap_add(map_t *stash, const knot_rrset_t *rr, uint8_t rank, knot_mm_t *pool); -/** @internal Add RRSet copy to RR array. */ -int kr_rrarray_add(rr_array_t *array, const knot_rrset_t *rr, knot_mm_t *pool); - /** @internal Add RRSet copy to ranked RR array. */ KR_EXPORT int kr_ranked_rrarray_add(ranked_rr_array_t *array, const knot_rrset_t *rr, -- 2.47.2