summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-12-29 19:08:22 +0100
committerLennart Poettering <lennart@poettering.net>2015-12-29 21:42:10 +0100
commitefd46a696d31097c38f653b36921e00c4df62319 (patch)
tree280ae29a66cbb19aefa069cef6644d9f143f7dd7
parent7feea00bb06bca94545d5682930c11a6dee9c642 (diff)
resolved: use CLAMP() intsead of MIN(MAX())
-rw-r--r--src/resolve/resolved-dns-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c
index a57385d47d..fbd1c27c14 100644
--- a/src/resolve/resolved-dns-server.c
+++ b/src/resolve/resolved-dns-server.c
@@ -253,7 +253,7 @@ void dns_server_packet_received(DnsServer *s, DnsServerFeatureLevel level, usec_
if (s->max_rtt < rtt) {
s->max_rtt = rtt;
- s->resend_timeout = MIN(MAX(DNS_TIMEOUT_MIN_USEC, s->max_rtt * 2), DNS_TIMEOUT_MAX_USEC);
+ s->resend_timeout = CLAMP(s->max_rtt * 2, DNS_TIMEOUT_MIN_USEC, DNS_TIMEOUT_MAX_USEC);
}
}