From: Adam C. Emerson Date: Mon, 7 Nov 2016 22:01:07 +0000 (-0500) Subject: rgw: strlen is not constexpr X-Git-Tag: v11.1.0~241^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a809cd62bbcaa28163e5157686de239a5fda0dd;p=ceph.git rgw: strlen is not constexpr Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index b8efaf1adc45..e78b3ea34048 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -591,12 +591,12 @@ void RGW_SWIFT_Auth_Get::execute() goto done; { - static constexpr size_t PREFIX_LEN = strlen("AUTH_rgwtk"); + static constexpr size_t PREFIX_LEN = sizeof("AUTH_rgwtk") - 1; char token_val[PREFIX_LEN + bl.length() * 2 + 1]; snprintf(token_val, PREFIX_LEN + 1, "AUTH_rgwtk"); buf_to_hex((const unsigned char *)bl.c_str(), bl.length(), - token_val + PREFIX_LEN); + token_val + PREFIX_LEN); dump_header(s, "X-Storage-Token", token_val); dump_header(s, "X-Auth-Token", token_val);