From: Vladimír Čunát Date: Tue, 20 Dec 2016 10:26:13 +0000 (+0100) Subject: kr_*_print: don't include them in release builds X-Git-Tag: v1.2.0-rc1~41^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5945013ba830cec42fff53352d9d7e96d4fa1122;p=thirdparty%2Fknot-resolver.git kr_*_print: don't include them in release builds --- diff --git a/lib/utils.c b/lib/utils.c index fb18ae9b2..35a7c19b2 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -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 */ + diff --git a/lib/utils.h b/lib/utils.h index af62a7dbb..e8718ca7f 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -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.