From: Vladimír Čunát Date: Tue, 7 Aug 2018 11:02:40 +0000 (+0200) Subject: cache nitpick: avoid verbose-logging of unitialized TTL X-Git-Tag: v3.0.0~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3d4e211dce82543dca63c184a9ca3a62ea38064;p=thirdparty%2Fknot-resolver.git cache nitpick: avoid verbose-logging of unitialized TTL Replaced by a visually recognizable dummy value, for simplicity. These were introduced in commits: cache: don't require cached NS for aggresive answers cache closest_NS(): factor out the inside of a loop --- diff --git a/lib/cache/peek.c b/lib/cache/peek.c index 16d8e66f5..062bf64d4 100644 --- a/lib/cache/peek.c +++ b/lib/cache/peek.c @@ -216,7 +216,7 @@ int peek_nosync(kr_layer_t *ctx, knot_pkt_t *pkt) /* Try the NSEC* parameters in order, until success. * Let's not mix different parameters for NSEC* RRs in a single proof. */ for (int i = 0; ;) { - int32_t log_new_ttl; + int32_t log_new_ttl = -123456789; /* visually recognizable value */ ret = nsec_p_ttl(el[i], qry, &log_new_ttl); if (!ret || VERBOSE_STATUS) { nsec_p_init(&ans.nsec_p, el[i], !ret); @@ -645,7 +645,7 @@ static int check_NS_entry(const knot_db_val_t entry, const int i, const bool exa uint16_t type; if (i < ENTRY_APEX_NSECS_CNT) { type = KNOT_RRTYPE_NS; - int32_t log_new_ttl; + int32_t log_new_ttl = -123456789; /* visually recognizable value */ const int err = nsec_p_ttl(entry, qry, &log_new_ttl); if (err) { VERBOSE_MSG(qry,