dns: Remove always true test in dns_alloc_random_port

The only way to exit the do-while loop is err != ERR_USE.
Thus get rid of the always true test.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2015-11-27 23:38:52 +08:00 committed by Dirk Ziegelmeier
parent 764bf251cd
commit 6e863ecb50

View File

@ -816,7 +816,7 @@ dns_alloc_random_port(void)
}
err = udp_bind(ret, IP_ADDR_ANY, port);
} while (err == ERR_USE);
if ((err != ERR_OK) && (err != ERR_USE)) {
if (err != ERR_OK) {
udp_remove(ret);
return NULL;
}