From: Kefu Chai Date: Wed, 14 Apr 2021 02:19:28 +0000 (+0800) Subject: rgw: use min instead of min() X-Git-Tag: v17.1.0~2237^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3c0aa2d70a2c39f18bff23b9b7e1e3d1eb8d3206;p=ceph.git rgw: use min instead of min() as its parameters' types might not be identical. to be specific, the 2nd parameter's type will be an unsigned one after the c++ => yaml migration. Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 1824fb1d5eef..f25adc06e50e 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3904,7 +3904,7 @@ void RGWPutObj::execute(optional_yield y) if (copy_source.empty()) { len = get_data(data); } else { - uint64_t cur_lst = min(fst + s->cct->_conf->rgw_max_chunk_size - 1, lst); + off_t cur_lst = min(fst + s->cct->_conf->rgw_max_chunk_size - 1, lst); op_ret = get_data(fst, cur_lst, data); if (op_ret < 0) return;