]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformat
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 4 Feb 2026 10:53:18 +0000 (11:53 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 4 Feb 2026 12:55:25 +0000 (13:55 +0100)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
.not-formatted
pdns/base64.cc
pdns/base64.hh

index c12aa9e68ecaeaaa188e41078b19c712e6b28bf9..b9561a6b72973bb8b631f411ee8ecac26a90ca96 100644 (file)
@@ -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
index 5eb10a70c1ae9207340df4a286a58a7dcdf03d3e..5d3081b23f37a803dbcee29f1431c6cd48cdaeca 100644 (file)
 #include <openssl/bio.h>
 #include <openssl/evp.h>
 
-
-template <typename Container> int B64Decode(const std::string& src, Container& dst)
+template <typename Container>
+int B64Decode(const std::string& src, Container& dst)
 {
-  if (src.empty() ) {
+  if (src.empty()) {
     dst.clear();
     return 0;
   }
@@ -39,7 +39,7 @@ template <typename Container> int B64Decode(const std::string& src, Container& d
   if (src.length() > std::numeric_limits<size_t>::max() / 7 || src.length() > std::numeric_limits<int>::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");
     }
index eaf3e0a070716ad85ef8435510863b3ea77392ba..3fa45911368b10b64d4c765c7000f7125765e1c3 100644 (file)
@@ -22,5 +22,6 @@
 #pragma once
 #include <string>
 
-template <typename Container> int B64Decode(const std::string& strInput, Container& strOutput);
+template <typename Container>
+int B64Decode(const std::string& strInput, Container& strOutput);
 std::string Base64Encode(const std::string& src);