From: Remi Gacogne Date: Fri, 14 Feb 2020 09:00:55 +0000 (+0100) Subject: dnsdist: Fix issues reported by Charles-Henri during code review X-Git-Tag: auth-4.3.0-beta2~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77c369f8e1229a2c151e256e192090bc18979d07;p=thirdparty%2Fpdns.git dnsdist: Fix issues reported by Charles-Henri during code review --- diff --git a/pdns/dnsdist.hh b/pdns/dnsdist.hh index bf54a89aeb..99f85ee0c0 100644 --- a/pdns/dnsdist.hh +++ b/pdns/dnsdist.hh @@ -860,9 +860,7 @@ struct DownstreamState void setName(const std::string& newName) { name = newName; - if (newName.empty()) { - nameWithAddr = newName.empty() ? remote.toStringWithPort() : (name + " (" + remote.toStringWithPort()+ ")"); - } + nameWithAddr = newName.empty() ? remote.toStringWithPort() : (name + " (" + remote.toStringWithPort()+ ")"); } string getStatus() const diff --git a/pdns/dnsdistdist/docs/guides/serverselection.rst b/pdns/dnsdistdist/docs/guides/serverselection.rst index 16f2084dec..47c4fa55bb 100644 --- a/pdns/dnsdistdist/docs/guides/serverselection.rst +++ b/pdns/dnsdistdist/docs/guides/serverselection.rst @@ -170,7 +170,7 @@ Functions .. function:: setServerPolicyLua(name, function) - Set server selection policy to one named `name`` and provided by ``function``. + Set server selection policy to one named ``name`` and provided by ``function``. :param string name: name for this policy :param string function: name of the function @@ -179,7 +179,7 @@ Functions .. versionadded:: 1.5.0 - Set server selection policy to one named `name`` and provided by the FFI function ``function``. + Set server selection policy to one named ``name`` and provided by the FFI function ``function``. :param string name: name for this policy :param string function: name of the FFI function diff --git a/pdns/dnsdistdist/docs/reference/config.rst b/pdns/dnsdistdist/docs/reference/config.rst index ff139f48bf..cbd1de0d53 100644 --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@ -18,7 +18,7 @@ Within dnsdist several core object types exist: * :class:`Server`: generated with :func:`newServer`, represents a downstream server * :class:`ComboAddress`: represents an IP address and port * :class:`DNSName`: represents a domain name -* :class:`Netmask`: represents a Netmask +* :class:`Netmask`: represents a netmask * :class:`NetmaskGroup`: represents a group of netmasks * :class:`QPSLimiter`: implements a QPS-based filter * :class:`SuffixMatchNode`: represents a group of domain suffixes for rapid testing of membership diff --git a/pdns/dnsdistdist/docs/reference/netmask.rst b/pdns/dnsdistdist/docs/reference/netmask.rst index 411d0a7e96..89a66307d6 100644 --- a/pdns/dnsdistdist/docs/reference/netmask.rst +++ b/pdns/dnsdistdist/docs/reference/netmask.rst @@ -26,7 +26,7 @@ Netmask Return a :class:`ComboAddress` object representing the base network of this netmask object after masking any additional bits if necessary (for example ``192.0.2.0`` if the netmask was constructed with ``newNetmask('192.0.2.1/24')). - .. method:: Netmask:isEmpty() -> bool + .. method:: Netmask:empty() -> bool Return true if the netmask is empty, meaning that the netmask has not been set to a proper value.