[libvirt PATCH 1/2] remote: close outfiles faster

Ján Tomko jtomko at redhat.com
Thu Mar 3 13:08:50 UTC 2022


Switch the operands in the loop condition to make it converge.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/remote/remote_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index d6295f32e9..7e7a21fcab 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -5977,7 +5977,7 @@ remoteDomainQemuMonitorCommandWithFiles(virDomainPtr domain,
 
  done:
     if (rpc_outfiles) {
-        for (i = 0; rpc_noutfiles < i; i++) {
+        for (i = 0; i < rpc_noutfiles; i++) {
             VIR_FORCE_CLOSE(rpc_outfiles[i]);
         }
     }
-- 
2.34.1




More information about the libvir-list mailing list