From ccb7d44482a3a59f16d06c591e68ce2ff85f1f43 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 29 Nov 2020 13:05:02 +0100 Subject: [PATCH] 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 Reviewed-by: Jeremy Allison --- source3/param/loadparm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index c218e2fc372..fbeed6782ad 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -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); } -- 2.47.3