isc_heap_t *heap;
dns_ttl_t oldttl;
- oldttl = header->rdh_ttl;
- header->rdh_ttl = newttl;
- if (!IS_CACHE(rbtdb))
+ if (!IS_CACHE(rbtdb)) {
+ header->rdh_ttl = newttl;
return;
+ }
+
+ oldttl = header->rdh_ttl;
+ header->rdh_ttl = newttl;
/*
* It's possible the rbtdb is not a cache. If this is the case,
init_rdataset(dns_rbtdb_t *rbtdb, rdatasetheader_t *h) {
ISC_LINK_INIT(h, link);
h->heap_index = 0;
- h->rdh_ttl = 0;
h->is_mmapped = 0;
h->next_is_relative = 0;
h->node_is_relative = 0;
#endif
memset(h->upper, 0xeb, sizeof(h->upper));
init_rdataset(rbtdb, h);
+ h->rdh_ttl = 0;
return (h);
}