From: Danny Al-Gaaf Date: Wed, 15 May 2013 12:56:27 +0000 (+0200) Subject: rgw/rgw_common.cc: reduce scope of 'end' in two cases X-Git-Tag: v0.64~119^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=492553b3c62a05dfee2a79f1ad8cb29104de0e5f;p=ceph.git rgw/rgw_common.cc: reduce scope of 'end' in two cases Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_common.cc b/src/rgw/rgw_common.cc index 5a9bf3d27471..1e37d9bac91f 100644 --- a/src/rgw/rgw_common.cc +++ b/src/rgw/rgw_common.cc @@ -734,9 +734,8 @@ int RGWUserCaps::remove_cap(const string& cap) int RGWUserCaps::add_from_string(const string& str) { int start = 0; - int end; do { - end = str.find(';', start); + int end = str.find(';', start); if (end < 0) end = str.size(); @@ -753,9 +752,8 @@ int RGWUserCaps::add_from_string(const string& str) int RGWUserCaps::remove_from_string(const string& str) { int start = 0; - int end; do { - end = str.find(';', start); + int end = str.find(';', start); if (end < 0) end = str.size();