summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2018-01-02 11:18:38 -0500
committerMatthew Russotto <matthew.russotto@10gen.com>2018-01-04 11:30:47 -0500
commitc9e92fdd8c4d3225b16893bdd278cdf415c10cf1 (patch)
tree32ff9995b99a051adb1d251968d429c0ef3fc70a
parent049439b766fa2b3ec15e973a66433077348ea847 (diff)
downloadmongo-c9e92fdd8c4d3225b16893bdd278cdf415c10cf1.tar.gz
SERVER-32444 Coverity analysis defect 102285: PW.PARAMETER_HIDDEN
-rw-r--r--src/mongo/db/commands/oplog_application_checks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/oplog_application_checks.cpp b/src/mongo/db/commands/oplog_application_checks.cpp
index 88b7296d6d9..39b8b41c2f6 100644
--- a/src/mongo/db/commands/oplog_application_checks.cpp
+++ b/src/mongo/db/commands/oplog_application_checks.cpp
@@ -80,8 +80,8 @@ Status OplogApplicationChecks::checkOperationAuthorization(OperationContext* opC
return Status(ErrorCodes::IllegalOperation, "Commands cannot be applied via doTxn.");
}
StringData commandName = o.firstElement().fieldNameStringData();
- Command* command = Command::findCommand(commandName);
- if (!command) {
+ Command* commandInOplogEntry = Command::findCommand(commandName);
+ if (!commandInOplogEntry) {
return Status(ErrorCodes::FailedToParse, "Unrecognized command in op");
}
@@ -94,7 +94,7 @@ Status OplogApplicationChecks::checkOperationAuthorization(OperationContext* opC
}
return Command::checkAuthorization(
- command, opCtx, OpMsgRequest::fromDBAndBody(dbNameForAuthCheck, o));
+ commandInOplogEntry, opCtx, OpMsgRequest::fromDBAndBody(dbNameForAuthCheck, o));
}
if (opType == "i"_sd) {