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>
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);
}