]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
Revert "debug: zone tree print function"
authorDaniel Salzman <daniel.salzman@nic.cz>
Mon, 5 Oct 2020 07:43:16 +0000 (09:43 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Mon, 5 Oct 2020 07:43:16 +0000 (09:43 +0200)
This reverts commit 1e4827b691e21c4ac4975ea325d66e1f01b590af.

src/knot/zone/zone-tree.c
src/knot/zone/zone-tree.h

index 23d5bca091f56fa2420953e4ef6b7c69f55ae82e..a07993461567bf3557ebd86263e1979714bf7854 100644 (file)
  */
 
 #include <assert.h>
-#include <stdio.h>
 #include <stdlib.h>
 
 #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) {
index a26b26dd53b7e15e3f8e511005b00fa2ba532cff..e0079dc1abae231b52216a4d3d1b583718276b7f 100644 (file)
@@ -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.
  *