HomeClusterLabs Projects
Diffusion LibQB 484fddddb875

ringbuffer: fix mistaken errno handling around _rb_chunk_reclaim

Description

ringbuffer: fix mistaken errno handling around _rb_chunk_reclaim

Previously, there were two separate logical issues:

  • errno could be set negative in qb_rb_chunk_alloc when when "reclaim" notifier failed
  • _rb_chunk_reclaim (note: local scoped, hence comfortable for changes) was already setting errno at a single (coincidentally, in a correct way, but that'd be overwritten with the inverse because of the previous logical issue in qb_rb_chunk_alloc), so make it set errno at each failure path (now also when internal integrity in _rb_chunk_reclaim failed(), sparing the callers to double on that task

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>

Details

Provenance
Jan Pokorný <jpokorny@redhat.com>Authored on Jul 19 2019, 4:35 AM
chrissie-cCommitted on Jul 26 2019, 4:39 AM
Parents
rQaad74c7e3918: array,log: Never set errno to a negative value
Branches
Unknown
Tags
Unknown

Event Timeline