]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Remove extra 'const' from cast
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 May 2018 23:43:33 +0000 (19:43 -0400)
committerNathan Cutler <ncutler@suse.com>
Fri, 18 May 2018 13:30:35 +0000 (15:30 +0200)
Casting to pointer-to-const makes sense. Casting to a const
value (even a const pointer) doesn't.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 46b40274d42e54bf80adb0086b02e9785e0646db)

src/rgw/rgw_http_client.cc

index d32f1b6734e0cdc0e8fe31eeaece46f879664c61..f341f87281cf54db0de0a7142efebc409176f8a0 100644 (file)
@@ -552,7 +552,7 @@ RGWHTTPClient::~RGWHTTPClient()
 
 int RGWHTTPHeadersCollector::receive_header(void * const ptr, const size_t len)
 {
-  const boost::string_ref header_line(static_cast<const char * const>(ptr), len);
+  const boost::string_ref header_line(static_cast<const char *>(ptr), len);
 
   /* We're tokening the line that way due to backward compatibility. */
   const size_t sep_loc = header_line.find_first_of(" \t:");