diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-06-24 14:34:46 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-06-24 14:34:46 +0200 |
commit | de4a76456560ad84adc4da9864d351c1882c09d6 (patch) | |
tree | 28ced8abfdc4ac5680dd7a838e65d32986682798 | |
parent | b485a3e68acf3dc5e437ee55c71fd67f418a5b70 (diff) | |
download | ceph-de4a76456560ad84adc4da9864d351c1882c09d6.tar.gz |
common/cmdparse.cc: reduce scope of local variable 'pos'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
-rw-r--r-- | src/common/cmdparse.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc index 584af054fa0..23e67f6de1b 100644 --- a/src/common/cmdparse.cc +++ b/src/common/cmdparse.cc @@ -50,12 +50,11 @@ dump_cmd_to_json(JSONFormatter *f, const string& cmd) std::string keyval; std::map<std::string, std::string>desckv; // accumulate descriptor keywords in desckv - size_t pos; while (std::getline(argdesc, keyval, ',')) { // key=value; key by itself implies value is bool true // name="name" means arg dict will be titled 'name' - pos = keyval.find('='); + size_t pos = keyval.find('='); std::string key, val; if (pos != std::string::npos) { key = keyval.substr(0, pos); |