When compiled with _GLIBCXX_ASSERTIONS we see an assert due to UB of
passing the address of an empty vector. Use vector's data member
function instead of address of array syntax.
Fixes: http://tracker.ceph.com/issues/39174
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
ceph_assert(id != 0);
int idout;
int r = crush.add_bucket(id, alg, hash, type, size,
- &items[0], &weights[0], &idout);
+ items.data(), weights.data(), &idout);
if (r < 0) {
if (r == -EEXIST)
err << "Duplicate bucket id " << id << std::endl;