From 03a9aac15709b3a1ba8a713e1191c48e5d44e65a Mon Sep 17 00:00:00 2001 From: sg Date: Tue, 22 Nov 2016 21:34:12 +0100 Subject: [PATCH] dns_enqueue(): minor readability improvement: add local variable "age" to store result of subtraction --- src/core/dns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/dns.c b/src/core/dns.c index 2aa1dd99..65355be7 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -1244,8 +1244,9 @@ dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, } /* check if this is the oldest completed entry */ if (entry->state == DNS_STATE_DONE) { - if ((u8_t)(dns_seqno - entry->seqno) > lseq) { - lseq = dns_seqno - entry->seqno; + u8_t age = dns_seqno - entry->seqno; + if (age > lseq) { + lseq = age; lseqi = i; } }