Commit ccbf9bb6 authored by Matthieu Dorier's avatar Matthieu Dorier
Browse files

fixed std::min

parent 5fcbf1d2
......@@ -1622,7 +1622,7 @@ static void sdskv_list_keys_ult(hg_handle_t handle)
ds_bulk_t start_kdata(,;
ds_bulk_t prefix(,;
auto keys = db->list_keys(start_kdata, in.max_keys, prefix);
hg_size_t num_keys = std::min(keys.size(), in.max_keys);
hg_size_t num_keys = std::min((size_t)keys.size(), (size_t)in.max_keys);
if(num_keys == 0) throw SDSKV_SUCCESS;
......@@ -1807,7 +1807,7 @@ static void sdskv_list_keyvals_ult(hg_handle_t handle)
ds_bulk_t start_kdata(,;
ds_bulk_t prefix(,;
auto keyvals = db->list_keyvals(start_kdata, in.max_keys, prefix);
hg_size_t num_keys = std::min(keyvals.size(), in.max_keys);
hg_size_t num_keys = std::min((size_t)keyvals.size(), (size_t)in.max_keys);
out.nkeys = num_keys;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment