]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: strlen is not constexpr
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 7 Nov 2016 22:01:07 +0000 (17:01 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Thu, 17 Nov 2016 00:54:31 +0000 (19:54 -0500)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_swift_auth.cc

index b8efaf1adc45dcf5f8a144ba88c0ba200d0e8a36..e78b3ea3404830f52fd001cba6f3d1ed9f9b6042 100644 (file)
@@ -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);