From: Rosen Penev Date: Tue, 5 Dec 2023 20:36:11 +0000 (-0800) Subject: fix error type X-Git-Tag: dnsdist-1.9.0-rc1~34^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6da6832bfb49a196accfee8908986a47428862ff;p=thirdparty%2Fpdns.git fix error type runtime_error does not take rvalue parameters. It's a copy anyway. Signed-off-by: Rosen Penev --- diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 55d8daad5a..0ea50d7c1f 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -35,14 +35,14 @@ /** these functions provide a very lightweight wrapper to the Berkeley sockets API. Errors -> exceptions! */ -static void RuntimeError(std::string&& error) +static void RuntimeError(const std::string& error) { - throw runtime_error(std::move(error)); + throw runtime_error(error); } -static void NetworkErr(std::string&& error) +static void NetworkErr(const std::string& error) { - throw NetworkError(std::move(error)); + throw NetworkError(error); } int SSocket(int family, int type, int flags)