On Thu, Jul 30, 2020 at 17:27:35 +0300, Nikolay Shirokovskiy wrote:
Most of bitmap setBit/clearBit/getBit users know that the bitmap
index is
not out of bound and thus don't check the return value. More precisely
the stats is next:
Method all check
===================================
virBitmapSetBit 85 14
virBitmapClearBit 15 3
virBitmapGetBit 15 6
where 'all' is the number of all occurences of the method and 'check' is
the
number of occurences with 'if (method' pattern.
Thus keeping the retvalue checking requirement produces more
noise then helps. I guess we even can make these function return
void as users can simply compare the index with the bitmap size.
Well. An ignore_value is not really expensive and it makes the callers
aware that something needs to be checked.
I don't really see the point of this.
Additionally, individual patches are missing justification in the commit
message. Mentioning it in the cover letter is not enough as that doesn't
get comitted.