1
0
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:
Peter Krempa 2021-12-06 15:55:46 +01:00
parent 58fec2cef4
commit 7d48c3d2d6
3 changed files with 5 additions and 11 deletions

View File

@ -196,10 +196,8 @@ virBitmapClearBit(virBitmap *bitmap,
* *
* Clear bit position @b in @bitmap. Expands the bitmap as necessary so that * Clear bit position @b in @bitmap. Expands the bitmap as necessary so that
* @b is included in the map. * @b is included in the map.
*
* Returns 0 on if bit is successfully cleared, -1 on error.
*/ */
int void
virBitmapClearBitExpand(virBitmap *bitmap, virBitmapClearBitExpand(virBitmap *bitmap,
size_t b) size_t b)
{ {
@ -208,8 +206,6 @@ virBitmapClearBitExpand(virBitmap *bitmap,
} else { } else {
bitmap->map[VIR_BITMAP_UNIT_OFFSET(b)] &= ~VIR_BITMAP_BIT(b); 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 (*cur == ',' || *cur == 0) {
if (neg) { if (neg) {
if (virBitmapClearBitExpand(bitmap, start) < 0) virBitmapClearBitExpand(bitmap, start);
goto error;
} else { } else {
if (virBitmapSetBitExpand(bitmap, start) < 0) if (virBitmapSetBitExpand(bitmap, start) < 0)
goto error; goto error;

View File

@ -54,8 +54,8 @@ int virBitmapSetBitExpand(virBitmap *bitmap, size_t b)
int virBitmapClearBit(virBitmap *bitmap, size_t b) int virBitmapClearBit(virBitmap *bitmap, size_t b)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virBitmapClearBitExpand(virBitmap *bitmap, size_t b) void virBitmapClearBitExpand(virBitmap *bitmap, size_t b)
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT; ATTRIBUTE_NONNULL(1);
/* /*
* Get bit @b in @bitmap. Returns false if b is out of range. * Get bit @b in @bitmap. Returns false if b is out of range.

View File

@ -564,8 +564,7 @@ test12a(const void *opaque G_GNUC_UNUSED)
if (checkBitmap(map, "128", 129) < 0) if (checkBitmap(map, "128", 129) < 0)
return -1; return -1;
if (virBitmapClearBitExpand(map, 150) < 0) virBitmapClearBitExpand(map, 150);
return -1;
if (checkBitmap(map, "128", 151) < 0) if (checkBitmap(map, "128", 151) < 0)
return -1; return -1;