]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
utils: remove unused kr_rrarray_add(...)
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 7 Jul 2017 11:16:41 +0000 (13:16 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 7 Jul 2017 15:40:11 +0000 (17:40 +0200)
Noticed after removal of its lua binding in commit 3be76db7610.

lib/utils.c
lib/utils.h

index 11cd293df98f42e44d1f5225406986919f3e8435..bc177a92c402f13fb65de37844c10bd90114674f 100644 (file)
@@ -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)
 {
index 90412fce39d7e09f794921066896928f05ccc303..3cbf989bd14c61352d3fcc581510b6281f19275c 100644 (file)
@@ -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,