The function can't fail at this point. Remove the return value.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
*
* Clear bit position @b in @bitmap. Expands the bitmap as necessary so that
* @b is included in the map.
- *
- * Returns 0 on if bit is successfully cleared, -1 on error.
*/
-int
+void
virBitmapClearBitExpand(virBitmap *bitmap,
size_t b)
{
} else {
bitmap->map[VIR_BITMAP_UNIT_OFFSET(b)] &= ~VIR_BITMAP_BIT(b);
}
-
- return 0;
}
if (*cur == ',' || *cur == 0) {
if (neg) {
- if (virBitmapClearBitExpand(bitmap, start) < 0)
- goto error;
+ virBitmapClearBitExpand(bitmap, start);
} else {
if (virBitmapSetBitExpand(bitmap, start) < 0)
goto error;
int virBitmapClearBit(virBitmap *bitmap, size_t b)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
-int virBitmapClearBitExpand(virBitmap *bitmap, size_t b)
- ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
+void virBitmapClearBitExpand(virBitmap *bitmap, size_t b)
+ ATTRIBUTE_NONNULL(1);
/*
* Get bit @b in @bitmap. Returns false if b is out of range.
if (checkBitmap(map, "128", 129) < 0)
return -1;
- if (virBitmapClearBitExpand(map, 150) < 0)
- return -1;
+ virBitmapClearBitExpand(map, 150);
if (checkBitmap(map, "128", 151) < 0)
return -1;