From: Otto Moerbeek Date: Wed, 4 Feb 2026 10:53:18 +0000 (+0100) Subject: Reformat X-Git-Tag: rec-5.4.0-rc1~17^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=719da3430387dc1d6f4316ba216c0de44c5a9123;p=thirdparty%2Fpdns.git Reformat Signed-off-by: Otto Moerbeek --- diff --git a/.not-formatted b/.not-formatted index c12aa9e68e..b9561a6b72 100644 --- a/.not-formatted +++ b/.not-formatted @@ -17,8 +17,6 @@ ./pdns/backends/gsql/gsqlbackend.cc ./pdns/backends/gsql/gsqlbackend.hh ./pdns/base32.cc -./pdns/base64.cc -./pdns/base64.hh ./pdns/bindparserclasses.hh ./pdns/calidns.cc ./pdns/capabilities.cc diff --git a/pdns/base64.cc b/pdns/base64.cc index 5eb10a70c1..5d3081b23f 100644 --- a/pdns/base64.cc +++ b/pdns/base64.cc @@ -28,10 +28,10 @@ #include #include - -template int B64Decode(const std::string& src, Container& dst) +template +int B64Decode(const std::string& src, Container& dst) { - if (src.empty() ) { + if (src.empty()) { dst.clear(); return 0; } @@ -39,7 +39,7 @@ template int B64Decode(const std::string& src, Container& d if (src.length() > std::numeric_limits::max() / 7 || src.length() > std::numeric_limits::max()) { throw std::runtime_error("B64Decode too large"); } - const size_t dlen = (src.length() * 6 + 7) / 8 ; + const size_t dlen = (src.length() * 6 + 7) / 8; dst.resize(dlen); BIO* bio = BIO_new(BIO_s_mem()); if (bio == nullptr) { @@ -86,7 +86,7 @@ std::string Base64Encode(const std::string& src) bio = BIO_push(b64, bio); BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL); int bioWriteRet = BIO_write(bio, src.c_str(), src.length()); - if (bioWriteRet < 0 || (size_t) bioWriteRet != src.length()) { + if (bioWriteRet < 0 || (size_t)bioWriteRet != src.length()) { BIO_free_all(bio); throw std::runtime_error("BIO_write failed to write all data to memory buffer"); } diff --git a/pdns/base64.hh b/pdns/base64.hh index eaf3e0a070..3fa4591136 100644 --- a/pdns/base64.hh +++ b/pdns/base64.hh @@ -22,5 +22,6 @@ #pragma once #include -template int B64Decode(const std::string& strInput, Container& strOutput); +template +int B64Decode(const std::string& strInput, Container& strOutput); std::string Base64Encode(const std::string& src);