mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
virBitmapClearBitExpand: Remove return value
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>
This commit is contained in:
parent
58fec2cef4
commit
7d48c3d2d6
@ -196,10 +196,8 @@ virBitmapClearBit(virBitmap *bitmap,
|
||||
*
|
||||
* 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)
|
||||
{
|
||||
@ -208,8 +206,6 @@ virBitmapClearBitExpand(virBitmap *bitmap,
|
||||
} else {
|
||||
bitmap->map[VIR_BITMAP_UNIT_OFFSET(b)] &= ~VIR_BITMAP_BIT(b);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -573,8 +569,7 @@ virBitmapParseUnlimited(const char *str)
|
||||
|
||||
if (*cur == ',' || *cur == 0) {
|
||||
if (neg) {
|
||||
if (virBitmapClearBitExpand(bitmap, start) < 0)
|
||||
goto error;
|
||||
virBitmapClearBitExpand(bitmap, start);
|
||||
} else {
|
||||
if (virBitmapSetBitExpand(bitmap, start) < 0)
|
||||
goto error;
|
||||
|
@ -54,8 +54,8 @@ int virBitmapSetBitExpand(virBitmap *bitmap, size_t b)
|
||||
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.
|
||||
|
@ -564,8 +564,7 @@ test12a(const void *opaque G_GNUC_UNUSED)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user