diff options
author | Matt Kangas <matt.kangas@mongodb.com> | 2014-11-11 11:21:41 -0500 |
---|---|---|
committer | Matt Kangas <matt.kangas@mongodb.com> | 2014-11-17 17:16:06 -0500 |
commit | d41f98bd0fdc3d392fc19aadfdc62a020d17fede (patch) | |
tree | b1d51bf50e0d6901117c79a454d00afde7894e57 /src/mongo/db/commands/touch.cpp | |
parent | 09d04e84e71651a5af7fa738c4614a6dd4dfb848 (diff) | |
download | mongo-d41f98bd0fdc3d392fc19aadfdc62a020d17fede.tar.gz |
SERVER-16072 improve namespace construction in commands
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; } |