1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

loadparm: Simplify lp_get_async_dns_timeout()

Use MAX, and per README.Coding we don't need the intermediate
variable. This can be inspected in the debugger directly.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2020-11-29 13:05:02 +01:00 committed by Jeremy Allison
parent a613ebc09d
commit ccb7d44482

View File

@ -4763,13 +4763,9 @@ enum samba_weak_crypto lp_weak_crypto()
uint32_t lp_get_async_dns_timeout(void)
{
uint32_t val = Globals.async_dns_timeout;
/*
* Clamp minimum async dns timeout to 1 second
* as per the man page.
*/
if (val < 1) {
val = 1;
}
return val;
return MAX(Globals.async_dns_timeout, 1);
}