Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
void RGWMetadataManager::parse_metadata_key(const string& metadata_key, string& type, string& entry)
{
- int pos = metadata_key.find(':');
- if (pos < 0) {
+ auto pos = metadata_key.find(':');
+ if (pos == string::npos) {
type = metadata_key;
} else {
type = metadata_key.substr(0, pos);
utime_t t(ut);
cls_log_add(op, t, section, key, bl);
- r = io_ctx.operate(oid, &op);
- return r;
+ return io_ctx.operate(oid, &op);
}
int RGWRados::time_log_add(const string& oid, list<cls_log_entry>& entries,