diff options
author | Andrew Morrow <acm@mongodb.com> | 2016-08-12 15:06:02 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2016-08-15 18:36:28 -0400 |
commit | dacf1667d1e650b4854ad33738b63ff379faec92 (patch) | |
tree | 63e0247eb0291604c4e76f254ce2606edd9925b8 /src/mongo/db/startup_warnings_common.cpp | |
parent | 2114a082f97dbe4263b10b836aca3332af5caca2 (diff) | |
download | mongo-dacf1667d1e650b4854ad33738b63ff379faec92.tar.gz |
SERVER-25402 Fewer binaries depend on interpolated version info
Diffstat (limited to 'src/mongo/db/startup_warnings_common.cpp')
-rw-r--r-- | src/mongo/db/startup_warnings_common.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/startup_warnings_common.cpp b/src/mongo/db/startup_warnings_common.cpp index c045a3f5f8d..9c444410b51 100644 --- a/src/mongo/db/startup_warnings_common.cpp +++ b/src/mongo/db/startup_warnings_common.cpp @@ -51,11 +51,10 @@ void logCommonStartupWarnings(const ServerGlobalParams& serverParams) { bool warned = false; { - const char* foo = strchr(versionString, '.') + 1; - int bar = atoi(foo); - if ((2 * (bar / 2)) != bar) { + auto&& vii = VersionInfoInterface::instance(); + if ((vii.minorVersion() % 2) != 0) { log() << startupWarningsLog; - log() << "** NOTE: This is a development version (" << versionString << ") of MongoDB." + log() << "** NOTE: This is a development version (" << vii.version() << ") of MongoDB." << startupWarningsLog; log() << "** Not recommended for production." << startupWarningsLog; warned = true; |