From f9a6d71904796817b6df6b1ae7818070c0f34a8c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Thu, 24 Oct 2013 08:46:31 -0700 Subject: [PATCH] radosgw-admin: remove unused function escape_str() This was added before formatters were used for dumping logs. Signed-off-by: Josh Durgin --- src/rgw/rgw_admin.cc | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index e19ed206c262..a14f1a2c7639 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -468,27 +468,6 @@ ReplicaLogType get_replicalog_type(const string& name) { return ReplicaLog_Invalid; } -string escape_str(string& src, char c) -{ - int pos = 0; - string dest; - - do { - int new_pos = src.find(c, pos); - if (new_pos >= 0) { - dest += src.substr(pos, new_pos - pos); - dest += "\\"; - dest += c; - } else { - dest += src.substr(pos); - return dest; - } - pos = new_pos + 1; - } while (pos < (int)src.size()); - - return dest; -} - static void show_user_info(RGWUserInfo& info, Formatter *formatter) { encode_json("user_info", info, formatter); -- 2.47.3