From: Daniel Salzman Date: Mon, 5 Oct 2020 07:43:16 +0000 (+0200) Subject: Revert "debug: zone tree print function" X-Git-Tag: v3.1.0~369 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f663075c466d12f2eceb4fa9219d2da272e6221;p=thirdparty%2Fknot-dns.git Revert "debug: zone tree print function" This reverts commit 1e4827b691e21c4ac4975ea325d66e1f01b590af. --- diff --git a/src/knot/zone/zone-tree.c b/src/knot/zone/zone-tree.c index 23d5bca091..a079934615 100644 --- a/src/knot/zone/zone-tree.c +++ b/src/knot/zone/zone-tree.c @@ -15,12 +15,11 @@ */ #include -#include #include #include "knot/zone/zone-tree.h" #include "libknot/consts.h" -#include "libknot/error.h" +#include "libknot/errcode.h" #include "libknot/packet/wire.h" #include "contrib/macros.h" @@ -475,25 +474,6 @@ void zone_trees_unify_binodes(zone_tree_t *nodes, zone_tree_t *nsec3_nodes, bool } } -static int print_owner_cb(zone_node_t *node, void *ctx) -{ - knot_dname_txt_storage_t *buf = ctx; - char *str = knot_dname_to_str(*buf, node->owner, sizeof(*buf)); - if (str != NULL) { - printf("%s\n", str); - } - return str == NULL ? KNOT_EMALF : KNOT_EOK; -} - -void zone_tree_print_owners(zone_tree_t *tree) -{ - knot_dname_txt_storage_t buf; - int ret = zone_tree_apply(tree, print_owner_cb, &buf); - if (ret != KNOT_EOK) { - printf("error listing zone tree (%s)\n", knot_strerror(ret)); - } -} - void zone_tree_free(zone_tree_t **tree) { if (tree == NULL || *tree == NULL) { diff --git a/src/knot/zone/zone-tree.h b/src/knot/zone/zone-tree.h index a26b26dd53..e0079dc1ab 100644 --- a/src/knot/zone/zone-tree.h +++ b/src/knot/zone/zone-tree.h @@ -320,11 +320,6 @@ int zone_tree_merge(zone_tree_t *into, zone_tree_t *what); */ void zone_trees_unify_binodes(zone_tree_t *nodes, zone_tree_t *nsec3_nodes, bool free_deleted); -/*! - * \brief Print to stdout all owners of nodes in zone tree. - */ -void zone_tree_print_owners(zone_tree_t *tree); - /*! * \brief Destroys the zone tree, not touching the saved data. *