From 478d0100747cde9927a56adf7ffbb585f2b29d24 Mon Sep 17 00:00:00 2001 From: Weibing Zhang Date: Wed, 5 Oct 2016 22:34:33 +0800 Subject: [PATCH] rgw: remove unused variable "ostr" in rgw_b64.h and fix the comment Signed-off-by: Weibing Zhang --- src/rgw/rgw_b64.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_b64.h b/src/rgw/rgw_b64.h index 8a9e8adafe7a2..36c984e815a8e 100644 --- a/src/rgw/rgw_b64.h +++ b/src/rgw/rgw_b64.h @@ -28,8 +28,7 @@ namespace rgw { inline std::string to_base64(boost::string_ref sref) { using namespace boost::archive::iterators; - std::string ostr; - + // output must be =padded modulo 3 auto psize = sref.size(); while ((psize % 3) != 0) { @@ -52,7 +51,7 @@ namespace rgw { std::string outstr(b64_iter(sref.data()), b64_iter(sref.data() + sref.size())); - // pad ostr with '=' to a length that is a multiple of 3 + // pad outstr with '=' to a length that is a multiple of 3 for (size_t ix = 0; ix < (psize-sref.size()); ++ix) outstr.push_back('='); -- 2.39.5