[PATCH 07/33] virhostcputest: linuxCPUStatsCompareFiles: Don't check return value of virBufferContentAndReset

Peter Krempa pkrempa at redhat.com
Wed Feb 24 16:16:42 UTC 2021


The buffer won't encounter OOM condition nowadays

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tests/virhostcputest.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/virhostcputest.c b/tests/virhostcputest.c
index 786a363e48..2608f0becc 100644
--- a/tests/virhostcputest.c
+++ b/tests/virhostcputest.c
@@ -141,10 +141,7 @@ linuxCPUStatsCompareFiles(const char *cpustatfile,
             goto fail;
     }

-    if (!(actualData = virBufferContentAndReset(&buf))) {
-        virReportOOMError();
-        goto fail;
-    }
+    actualData = virBufferContentAndReset(&buf);

     if (virTestCompareToFile(actualData, outfile) < 0)
         goto fail;
-- 
2.29.2




More information about the libvir-list mailing list