summaryrefslogtreecommitdiff
path: root/src/mongo/db/mongod_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r--src/mongo/db/mongod_main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp
index 31aa1d7079b..c2060a15738 100644
--- a/src/mongo/db/mongod_main.cpp
+++ b/src/mongo/db/mongod_main.cpp
@@ -288,7 +288,7 @@ void logStartup(OperationContext* opCtx) {
Lock::GlobalWrite lk(opCtx);
AutoGetDb autoDb(opCtx, startupLogCollectionName.dbName(), mongo::MODE_X);
auto db = autoDb.ensureDbExists(opCtx);
- CollectionPtr collection =
+ auto collection =
CollectionCatalog::get(opCtx)->lookupCollectionByNamespace(opCtx, startupLogCollectionName);
WriteUnitOfWork wunit(opCtx);
if (!collection) {
@@ -303,7 +303,7 @@ void logStartup(OperationContext* opCtx) {
invariant(collection);
uassertStatusOK(collection_internal::insertDocument(
- opCtx, collection, InsertStatement(o), nullptr /* OpDebug */, false));
+ opCtx, CollectionPtr(collection), InsertStatement(o), nullptr /* OpDebug */, false));
wunit.commit();
}