From 1bd24e79bee1800e7191863cc4617b12fe614dbe Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 18 May 2022 09:14:15 +0200 Subject: [PATCH] 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 Reviewed-by: Pavel Hrdina --- src/util/virportallocator.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c index 44edd8f99a..97ab362749 100644 --- a/src/util/virportallocator.c +++ b/src/util/virportallocator.c @@ -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; -- 2.47.2