diff options
Diffstat (limited to 'src/mongo/platform')
-rw-r--r-- | src/mongo/platform/decimal128.cpp | 2 | ||||
-rw-r--r-- | src/mongo/platform/posix_fadvise.cpp | 5 | ||||
-rw-r--r-- | src/mongo/platform/process_id.cpp | 2 | ||||
-rw-r--r-- | src/mongo/platform/random.cpp | 10 | ||||
-rw-r--r-- | src/mongo/platform/shared_library_posix.cpp | 3 | ||||
-rw-r--r-- | src/mongo/platform/shared_library_windows.cpp | 12 | ||||
-rw-r--r-- | src/mongo/platform/strcasestr.cpp | 5 | ||||
-rw-r--r-- | src/mongo/platform/strnlen.cpp | 2 | ||||
-rw-r--r-- | src/mongo/platform/windows_basic.h | 2 |
9 files changed, 22 insertions, 21 deletions
diff --git a/src/mongo/platform/decimal128.cpp b/src/mongo/platform/decimal128.cpp index d0af1ea5bb9..1639c7fb749 100644 --- a/src/mongo/platform/decimal128.cpp +++ b/src/mongo/platform/decimal128.cpp @@ -25,8 +25,8 @@ * then also delete it in the license file. */ -#include "mongo/platform/basic.h" #include "mongo/platform/decimal128.h" +#include "mongo/platform/basic.h" #include <cmath> #include <cstdlib> diff --git a/src/mongo/platform/posix_fadvise.cpp b/src/mongo/platform/posix_fadvise.cpp index eecf49e5351..76b5831b5d5 100644 --- a/src/mongo/platform/posix_fadvise.cpp +++ b/src/mongo/platform/posix_fadvise.cpp @@ -52,9 +52,8 @@ int posix_fadvise(int fd, off_t offset, off_t len, int advice) { // 'posix_fadvise()' on Solaris will call the emulation if the symbol is not found // -MONGO_INITIALIZER_GENERAL(SolarisPosixFadvise, - MONGO_NO_PREREQUISITES, - ("default"))(InitializerContext* context) { +MONGO_INITIALIZER_GENERAL(SolarisPosixFadvise, MONGO_NO_PREREQUISITES, ("default")) +(InitializerContext* context) { void* functionAddress = dlsym(RTLD_DEFAULT, "posix_fadvise"); if (functionAddress != NULL) { mongo::pal::posix_fadvise_switcher = diff --git a/src/mongo/platform/process_id.cpp b/src/mongo/platform/process_id.cpp index e485c9e0878..12bab6fbeab 100644 --- a/src/mongo/platform/process_id.cpp +++ b/src/mongo/platform/process_id.cpp @@ -30,8 +30,8 @@ #include "mongo/platform/process_id.h" #include <iostream> -#include <sstream> #include <limits> +#include <sstream> namespace mongo { diff --git a/src/mongo/platform/random.cpp b/src/mongo/platform/random.cpp index 48df149d460..c1ab7e8429c 100644 --- a/src/mongo/platform/random.cpp +++ b/src/mongo/platform/random.cpp @@ -43,13 +43,13 @@ #define _CRT_RAND_S #include <cstdlib> -#include <iostream> #include <fstream> +#include <iostream> #include <limits> #include <mongo/stdx/memory.h> -#include <mongo/util/log.h> #include <mongo/util/assert_util.h> +#include <mongo/util/log.h> namespace mongo { @@ -112,7 +112,8 @@ public: &_algHandle, BCRYPT_RNG_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0); if (ntstatus != STATUS_SUCCESS) { error() << "Failed to open crypto algorithm provider while creating secure random " - "object; NTSTATUS: " << ntstatus; + "object; NTSTATUS: " + << ntstatus; fassertFailed(28815); } } @@ -121,7 +122,8 @@ public: auto ntstatus = ::BCryptCloseAlgorithmProvider(_algHandle, 0); if (ntstatus != STATUS_SUCCESS) { warning() << "Failed to close crypto algorithm provider destroying secure random " - "object; NTSTATUS: " << ntstatus; + "object; NTSTATUS: " + << ntstatus; } } diff --git a/src/mongo/platform/shared_library_posix.cpp b/src/mongo/platform/shared_library_posix.cpp index 2cad9be817e..9468665dfe6 100644 --- a/src/mongo/platform/shared_library_posix.cpp +++ b/src/mongo/platform/shared_library_posix.cpp @@ -78,7 +78,8 @@ StatusWith<void*> SharedLibrary::getSymbol(StringData name) { if (error_msg != nullptr) { return StatusWith<void*>(ErrorCodes::InternalError, str::stream() << "dlsym failed for symbol " << name - << " with error message: " << error_msg); + << " with error message: " + << error_msg); } return StatusWith<void*>(symbol); diff --git a/src/mongo/platform/shared_library_windows.cpp b/src/mongo/platform/shared_library_windows.cpp index e3f9431ce60..19e90bc2af0 100644 --- a/src/mongo/platform/shared_library_windows.cpp +++ b/src/mongo/platform/shared_library_windows.cpp @@ -55,9 +55,9 @@ StatusWith<std::unique_ptr<SharedLibrary>> SharedLibrary::create( HMODULE handle = LoadLibraryW(full_path.c_str()); if (handle == nullptr) { - return StatusWith<std::unique_ptr<SharedLibrary>>( - ErrorCodes::InternalError, - str::stream() << "Load library failed: " << errnoWithDescription()); + return StatusWith<std::unique_ptr<SharedLibrary>>(ErrorCodes::InternalError, + str::stream() << "Load library failed: " + << errnoWithDescription()); } return StatusWith<std::unique_ptr<SharedLibrary>>( @@ -73,9 +73,9 @@ StatusWith<void*> SharedLibrary::getSymbol(StringData name) { if (function == nullptr) { DWORD gle = GetLastError(); if (gle != ERROR_PROC_NOT_FOUND) { - return StatusWith<void*>( - ErrorCodes::InternalError, - str::stream() << "GetProcAddress failed for symbol: " << errnoWithDescription()); + return StatusWith<void*>(ErrorCodes::InternalError, + str::stream() << "GetProcAddress failed for symbol: " + << errnoWithDescription()); } } diff --git a/src/mongo/platform/strcasestr.cpp b/src/mongo/platform/strcasestr.cpp index eb5f39b442e..d71e61c8fe6 100644 --- a/src/mongo/platform/strcasestr.cpp +++ b/src/mongo/platform/strcasestr.cpp @@ -94,9 +94,8 @@ namespace mongo { // 'strcasestr()' on Solaris will call the emulation if the symbol is not found // -MONGO_INITIALIZER_GENERAL(SolarisStrCaseCmp, - MONGO_NO_PREREQUISITES, - ("default"))(InitializerContext* context) { +MONGO_INITIALIZER_GENERAL(SolarisStrCaseCmp, MONGO_NO_PREREQUISITES, ("default")) +(InitializerContext* context) { void* functionAddress = dlsym(RTLD_DEFAULT, "strcasestr"); if (functionAddress != NULL) { mongo::pal::strcasestr_switcher = diff --git a/src/mongo/platform/strnlen.cpp b/src/mongo/platform/strnlen.cpp index 04bf74d7b65..1cd78875241 100644 --- a/src/mongo/platform/strnlen.cpp +++ b/src/mongo/platform/strnlen.cpp @@ -25,8 +25,8 @@ * then also delete it in the license file. */ -#include "mongo/config.h" #include "mongo/platform/strnlen.h" +#include "mongo/config.h" #ifndef MONGO_CONFIG_HAVE_STRNLEN diff --git a/src/mongo/platform/windows_basic.h b/src/mongo/platform/windows_basic.h index ac6cb289dc8..372630ffd5f 100644 --- a/src/mongo/platform/windows_basic.h +++ b/src/mongo/platform/windows_basic.h @@ -86,9 +86,9 @@ // get the definitions from ntstatus.h, which has a more complete list. #define WIN32_NO_STATUS +#include <windows.h> #include <winsock2.h> //this must be included before the first windows.h include #include <ws2tcpip.h> -#include <windows.h> #undef WIN32_NO_STATUS |