diff options
Diffstat (limited to 'src/mongo/db/commands/touch.cpp')
-rw-r--r-- | src/mongo/db/commands/touch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/touch.cpp b/src/mongo/db/commands/touch.cpp index 34cdc891c78..115b69c0d38 100644 --- a/src/mongo/db/commands/touch.cpp +++ b/src/mongo/db/commands/touch.cpp @@ -79,8 +79,8 @@ namespace mongo { string& errmsg, BSONObjBuilder& result, bool fromRepl) { - string coll = cmdObj.firstElement().valuestr(); - if( coll.empty() || dbname.empty() ) { + const std::string coll = cmdObj.firstElement().valuestrsafe(); + if (coll.empty()) { errmsg = "no collection name specified"; return false; } |