mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: Do not report useless error in virPortAllocatorRelease
If the port allocator bitmap does not have enough bits to keep the state of the port we're going to release, the port is not reserved and thus is trivially released without doing anything. No need to report an error in such case. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
b7b8cd6ad6
commit
1bd24e79be
@ -254,12 +254,7 @@ virPortAllocatorRelease(unsigned short port)
|
||||
return 0;
|
||||
|
||||
VIR_WITH_OBJECT_LOCK_GUARD(pa) {
|
||||
if (virBitmapClearBit(pa->bitmap, port) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Failed to release port %d"),
|
||||
port);
|
||||
return -1;
|
||||
}
|
||||
ignore_value(virBitmapClearBit(pa->bitmap, port));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user