]> git-server-git.apps.pok.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)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 9 May 2018 17:26:29 +0000 (13:26 -0400)
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>
src/rgw/rgw_http_client.cc

index a659f4c144a6f980b4e5506a9b9ae2e7696ef0f9..06623000c703607efcb03646c4aaf172d055347a 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:");