From d41f98bd0fdc3d392fc19aadfdc62a020d17fede Mon Sep 17 00:00:00 2001 From: Matt Kangas Date: Tue, 11 Nov 2014 11:21:41 -0500 Subject: SERVER-16072 improve namespace construction in commands --- src/mongo/db/commands/touch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/commands/touch.cpp') 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; } -- cgit v1.2.1