Sticking random #defines everywhere is just atrocious style.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
int request_complete() override;
static std::string gen_random_cookie(CephContext* cct) {
-#define COOKIE_LEN 16
+ static constexpr std::size_t COOKIE_LEN = 16;
char buf[COOKIE_LEN + 1];
gen_rand_alphanumeric(cct, buf, sizeof(buf) - 1);
return buf;
~RGWPutLC() override {}
void init(rgw::sal::Driver* driver, req_state *s, RGWHandler *dialect_handler) override {
-#define COOKIE_LEN 16
+ static constexpr std::size_t COOKIE_LEN = 16;
char buf[COOKIE_LEN + 1];
RGWOp::init(driver, s, dialect_handler);