]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
kr_*_print: don't include them in release builds
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 20 Dec 2016 10:26:13 +0000 (11:26 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 11 Jan 2017 12:10:22 +0000 (13:10 +0100)
lib/utils.c
lib/utils.h

index fb18ae9b2c5bae8cdc20d558e0c5d427075f8867..35a7c19b2a7e7f0a01c4934a2c1c39f46954d2b7 100644 (file)
@@ -503,6 +503,8 @@ char *kr_module_call(struct kr_context *ctx, const char *module, const char *pro
        return NULL;
 }
 
+#ifndef NDEBUG
+
 void kr_rrset_print(const knot_rrset_t *rr)
 {
        char rrtext[KNOT_DNAME_MAXLEN * 2] = {0};
@@ -560,3 +562,6 @@ void kr_rrtype_print(const uint16_t rrtype, const char *prefix, const char *post
        knot_rrtype_to_string(rrtype, str, 32);
        printf ("%s%s%s", prefix, str, postfix);
 }
+
+#endif /* !NDEBUG */
+
index af62a7dbb952c0f5b70ed35cadf19d8ee50d2e7d..e8718ca7f430e05410a6ecf20f361ad69a8e66c3 100644 (file)
@@ -191,10 +191,12 @@ int kr_ranked_rrarray_add(ranked_rr_array_t *array, const knot_rrset_t *rr,
 
 int kr_ranked_rrarray_set_wire(ranked_rr_array_t *array, bool to_wire, uint32_t qry_uid);
 
+#ifndef NDEBUG /* These might be useful (again) during debugging. */
 void kr_rrset_print(const knot_rrset_t *rr);
 void kr_pkt_print(knot_pkt_t *pkt);
 void kr_dname_print(const knot_dname_t *name, const char *prefix, const char *postfix);
 void kr_rrtype_print(const uint16_t rrtype, const char *prefix, const char *postfix);
+#endif
 
 /**
  * Call module property.