]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/common: rgw_bl_str(bl) avoids bl.c_str() 55148/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 12 Jan 2024 16:19:11 +0000 (11:19 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 12 Jan 2024 16:26:22 +0000 (11:26 -0500)
commit26b361d1edbdf070724f0e0c5ba30accaf57d475
tree6df54a06806555b62b0c94ff0296d6e0795cba7d
parent9a93e9375f236379faaf0a7103ad4b74c9a72de4
rgw/common: rgw_bl_str(bl) avoids bl.c_str()

where bl contains multiple buffer segments, c_str() has to
rellocate and copy those segments into a single buffer. use c_str()
instead, which just copies each segment into the resulting string

this allows the function to take the bufferlist argument by const ref

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_common.h