instead of using
*optional_val = value;
we should use:
optional_val = value;
otherwise we will have following runtime assertion failure like
/usr/include/c++/8/optional:945: constexpr _Tp& std::_Optional_base<_Tp, true, true>::_M_get() [with _Tp = RGWBucketInfo*]: Assertion 'this->_M_is_engaged()' failed.
when compiled with the `_GLIBCXX_ASSERTIONS` macro defined. and recent
`redhat-rpm-config` adds `-D_GLIBCXX_ASSERTIONS` to
`__global_compiler_flags`, which is in turn included by `optflags`. and
`optflags` is pratically used everywhere.
Fixes: https://tracker.ceph.com/issues/43414
Signed-off-by: Kefu Chai <kchai@redhat.com>
return r;
}
} else {
- *orig_info = &shared_bucket_info;
+ orig_info = &shared_bucket_info;
}
}