diff options
author | Jack Lloyd <[email protected]> | 2017-10-01 06:13:06 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-10-01 06:13:06 -0400 |
commit | 97193ee43de6843d5e8a6eac67f54a8c315f52bb (patch) | |
tree | a78c34ef7c38c590d7e709cfcbb7ed956ac35bca | |
parent | c868a71bdf77222f1700d3932d97d2a21e25b953 (diff) |
Use explicit :: or std:: to refer to functions in namespaces
-rw-r--r-- | src/cli/tls_client.cpp | 6 | ||||
-rw-r--r-- | src/cli/tls_server.cpp | 4 | ||||
-rw-r--r-- | src/lib/pubkey/mce/mce_workfactor.cpp | 2 | ||||
-rw-r--r-- | src/tests/test_compression.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/cli/tls_client.cpp b/src/cli/tls_client.cpp index 7716cfade..d773cd81f 100644 --- a/src/cli/tls_client.cpp +++ b/src/cli/tls_client.cpp @@ -222,7 +222,7 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks } else if(got == -1) { - output() << "Socket error: " << errno << " " << strerror(errno) << "\n"; + output() << "Socket error: " << errno << " " << std::strerror(errno) << "\n"; continue; } @@ -242,7 +242,7 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks } else if(got == -1) { - output() << "Stdin error: " << errno << " " << strerror(errno) << "\n"; + output() << "Stdin error: " << errno << " " << std::strerror(errno) << "\n"; continue; } @@ -302,7 +302,7 @@ class TLS_Client final : public Command, public Botan::TLS::Callbacks if(::connect(fd, rp->ai_addr, rp->ai_addrlen) != 0) { - close(fd); + ::close(fd); continue; } diff --git a/src/cli/tls_server.cpp b/src/cli/tls_server.cpp index eb4869899..0d3dca785 100644 --- a/src/cli/tls_server.cpp +++ b/src/cli/tls_server.cpp @@ -203,7 +203,7 @@ class TLS_Server final : public Command if(got == -1) { - error_output() << "Error in socket read - " << strerror(errno) << std::endl; + error_output() << "Error in socket read - " << std::strerror(errno) << std::endl; break; } @@ -313,7 +313,7 @@ class TLS_Server final : public Command if(sent == -1) { - error_output() << "Error writing to socket - " << strerror(errno) << std::endl; + error_output() << "Error writing to socket - " << std::strerror(errno) << std::endl; } else if(sent != static_cast<ssize_t>(length)) { diff --git a/src/lib/pubkey/mce/mce_workfactor.cpp b/src/lib/pubkey/mce/mce_workfactor.cpp index d4adb3647..ce38781c8 100644 --- a/src/lib/pubkey/mce/mce_workfactor.cpp +++ b/src/lib/pubkey/mce/mce_workfactor.cpp @@ -53,7 +53,7 @@ double cout_iter(size_t n, size_t k, size_t p, size_t l) { double x = binomial(k / 2, p); const size_t i = static_cast<size_t>(std::log(x) / std::log(2)); - double res = 2 * p * (n - k - l) * ldexp(x * x, -static_cast<int>(l)); + double res = 2 * p * (n - k - l) * std::ldexp(x * x, -static_cast<int>(l)); // x <- binomial(k/2,p)*2*(2*l+log[2](binomial(k/2,p))) x *= 2 * (2 * l + i); diff --git a/src/tests/test_compression.cpp b/src/tests/test_compression.cpp index 4cb9ece8b..04eb26200 100644 --- a/src/tests/test_compression.cpp +++ b/src/tests/test_compression.cpp @@ -58,7 +58,7 @@ class Compression_Tests final : public Test std::vector<Test::Result> run() override { std::vector<Test::Result> results; - const size_t text_len = strlen(text_str); + const size_t text_len = std::strlen(text_str); for(std::string algo : { "zlib", "deflate", "gzip", "bz2", "lzma" }) { |