resolved: drop unnecessary comparison (#6220)
mtu is always greater than UDP_PACKET_HEADER_SIZE at this point. Pointed out by Benjamin Robin.
This commit is contained in:
committed by
Lennart Poettering
parent
1943fd9f40
commit
d718d20225
@@ -57,7 +57,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
|
||||
if (mtu < UDP_PACKET_HEADER_SIZE)
|
||||
a = DNS_PACKET_SIZE_START;
|
||||
else
|
||||
a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
|
||||
a = mtu;
|
||||
|
||||
/* round up to next page size */
|
||||
a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
|
||||
|
||||
Reference in New Issue
Block a user