summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2023-01-04 23:10:07 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2023-01-04 23:10:07 +0000
commit3822825e54d758bbbfd16ee1e6db2206029387a6 (patch)
tree79c244a5d88668bcd8a74e4eb795c04eceb6d242
parent1da54210fc57e593c2233a78208b2cea9d62599c (diff)
downloaddnsmasq-3822825e54d758bbbfd16ee1e6db2206029387a6.tar.gz
Fix cosmetic big in dump_cache_entry()
-rw-r--r--src/cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cache.c b/src/cache.c
index 6ed4e8c..42283bc 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1078,7 +1078,6 @@ static void add_hosts_entry(struct crec *cache, union all_addr *addr, int addrle
the array rhash, hashed on address. Note that rhash and the values
in ->next are only valid whilst reading hosts files: the buckets are
then freed, and the ->next pointer used for other things.
-
Only insert each unique address once into this hashing structure.
This complexity avoids O(n^2) divergent CPU use whilst reading
@@ -1823,7 +1822,7 @@ static void dump_cache_entry(struct crec *cache, time_t now)
else if (cache->flags & F_DNSKEY)
t = "K";
#endif
- else /* non-terminal */
+ else if (!(cache->flags & F_NXDOMAIN)) /* non-terminal */
t = "!";
p += sprintf(p, "%-40.40s %s%s%s%s%s%s%s%s%s%s ", a, t,