diff options
Diffstat (limited to 'src/mongo/shell/dbshell.cpp')
-rw-r--r-- | src/mongo/shell/dbshell.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp index 9ee4527f86c..4282d05a525 100644 --- a/src/mongo/shell/dbshell.cpp +++ b/src/mongo/shell/dbshell.cpp @@ -184,7 +184,7 @@ void generateCompletions(const std::string& prefix, std::vector<std::string>& al try { BSONObj args = BSON("0" << prefix); shellMainScope->invokeSafe( - "function callShellAutocomplete(x) {shellAutocomplete(x)}", &args, NULL); + "function callShellAutocomplete(x) {shellAutocomplete(x)}", &args, nullptr); BSONObjBuilder b; shellMainScope->append(b, "", "__autocomplete__"); BSONObj res = b.obj(); @@ -543,7 +543,7 @@ static void edit(const std::string& whatToEdit) { GetTempPathA(sizeof tempFolder, tempFolder); sb << tempFolder << "mongo_edit" << time(0) + i << ".js"; #else - sb << "/tmp/mongo_edit" << time(0) + i << ".js"; + sb << "/tmp/mongo_edit" << time(nullptr) + i << ".js"; #endif filename = sb.str(); if (!::mongo::shell_utils::fileExists(filename)) @@ -834,7 +834,7 @@ int _main(int argc, char* argv[], char** envp) { "function() { return typeof TestData === 'object' && TestData !== null && " "TestData.hasOwnProperty('failIfUnterminatedProcesses') && " "TestData.failIfUnterminatedProcesses; }"_sd; - shellMainScope->invokeSafe(code.rawData(), 0, 0); + shellMainScope->invokeSafe(code.rawData(), nullptr, nullptr); failIfUnterminatedProcesses = shellMainScope->getBoolean("__returnValue"); if (failIfUnterminatedProcesses) { @@ -858,7 +858,7 @@ int _main(int argc, char* argv[], char** envp) { std::string rcLocation; if (!shellGlobalParams.norc) { #ifndef _WIN32 - if (getenv("HOME") != NULL) + if (getenv("HOME") != nullptr) rcLocation = str::stream() << getenv("HOME") << "/.mongorc.js"; #else if (getenv("HOMEDRIVE") != NULL && getenv("HOMEPATH") != NULL) |