From 3c0aa2d70a2c39f18bff23b9b7e1e3d1eb8d3206 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 14 Apr 2021 10:19:28 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 1824fb1d5eef0..f25adc06e50e1 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; -- 2.39.5