mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 18:32:46 +00:00
dns: Drop unnecessary txid variable in dns_check_entry
Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
parent
d66442ba91
commit
f8a95aa27f
@ -938,12 +938,9 @@ dns_check_entry(u8_t i)
|
||||
LWIP_ASSERT("array index out of bounds", i < DNS_TABLE_SIZE);
|
||||
|
||||
switch (entry->state) {
|
||||
|
||||
case DNS_STATE_NEW: {
|
||||
u16_t txid;
|
||||
case DNS_STATE_NEW:
|
||||
/* initialize new entry */
|
||||
txid = dns_create_txid();
|
||||
entry->txid = txid;
|
||||
entry->txid = dns_create_txid();
|
||||
entry->state = DNS_STATE_ASKING;
|
||||
entry->server_idx = 0;
|
||||
entry->tmr = 1;
|
||||
@ -956,8 +953,6 @@ dns_check_entry(u8_t i)
|
||||
("dns_send returned error: %s\n", lwip_strerr(err)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case DNS_STATE_ASKING:
|
||||
if (--entry->tmr == 0) {
|
||||
if (++entry->retries == DNS_MAX_RETRIES) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user