[PATCH 1/2] util: numa: Remove impossible error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The code guarantees that virBitmapSetBit won't be called with out of
range values. Just ignore the return value and remove dead error
handling.
---
 src/util/virnuma.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/util/virnuma.c b/src/util/virnuma.c
index fc25051..c4d11fa 100644
--- a/src/util/virnuma.c
+++ b/src/util/virnuma.c
@@ -1004,12 +1004,7 @@ virNumaGetHostNodeset(void)
         if (!virNumaNodeIsAvailable(i))
             continue;

-        if (virBitmapSetBit(nodeset, i) < 0) {
-            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                           _("Problem setting bit in bitmap"));
-            virBitmapFree(nodeset);
-            return NULL;
-        }
+        ignore_value(virBitmapSetBit(nodeset, i));
     }

     return nodeset;
-- 
2.10.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]