[PATCH] Useless statement in openvzGetVPSInfo

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

 



Hi,
the patch is now in attachement..

I think, that the statement
    if (!vm)
         vm = *pnext;
will never be executed: in the first pass, we have already check this a few lines before; in next passes, vm remains the same...

Anton

diff --git a/src/openvz_conf.c b/src/openvz_conf.c
index 79d1e90..c5b6588 100644
--- a/src/openvz_conf.c
+++ b/src/openvz_conf.c
@@ -530,9 +530,6 @@ openvzGetVPSInfo(virConnectPtr conn) {
             goto error;
         }
 
-        if(!vm)
-            vm = *pnext;
-
         if (fscanf(fp, "%d %s\n", &veid, status) != 2) {
 	    error(conn, VIR_ERR_INTERNAL_ERROR,
 	          "Failed to parse vzlist output");
--
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]