diff --git a/ircd/allocator_je.cc b/ircd/allocator_je.cc index 2e2436b14..429d61cec 100644 --- a/ircd/allocator_je.cc +++ b/ircd/allocator_je.cc @@ -82,7 +82,7 @@ ircd::allocator::get(const string_view &key_, syscall(::mallctl, key, data(buf), &len, nullptr, 0UL); return string_view { - data(buf), len + data(buf), std::min(len, size(buf)) }; } #endif @@ -100,7 +100,7 @@ ircd::allocator::set(const string_view &key_, syscall(::mallctl, key, data(cur), &curlen, const_cast(data(val)), size(val)); return string_view { - data(cur), curlen + data(cur), std::min(curlen, size(cur)) }; } #endif