]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: numa: Remove impossible error handling
authorPeter Krempa <pkrempa@redhat.com>
Tue, 13 Sep 2016 12:28:33 +0000 (14:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 14 Sep 2016 06:41:41 +0000 (08:41 +0200)
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

index fc25051b4690c5772c3a34cd917f732931d43ce3..c4d11fa6e02deeb90282caba75431e969751b1d0 100644 (file)
@@ -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;