From: Volker Lendecke Date: Sun, 29 Nov 2020 12:05:02 +0000 (+0100) Subject: loadparm: Simplify lp_get_async_dns_timeout() X-Git-Tag: samba-4.14.0rc1~547 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ccb7d44482a3a59f16d06c591e68ce2ff85f1f43;p=thirdparty%2Fsamba.git 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 --- 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); }