[PATCH 01/16] Remove bogus assert() from migration code

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

 



assert() is forbidden in libvirt code, and these two cases would
in fact never execute due to earlier error checks.

* src/libvirt.c: Remove assert() usage
---
 src/libvirt.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/libvirt.c b/src/libvirt.c
index 10c3cdf..d369aae 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -17,7 +17,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <assert.h>
 #include <sys/wait.h>
 #include <time.h>
 #include <gcrypt.h>
@@ -3368,7 +3367,6 @@ virDomainMigrateVersion1 (virDomainPtr domain,
     }
     if (uri_out)
         uri = uri_out; /* Did domainMigratePrepare change URI? */
-    assert (uri != NULL);
 
     /* Perform the migration.  The driver isn't supposed to return
      * until the migration is complete.
@@ -3458,7 +3456,6 @@ virDomainMigrateVersion2 (virDomainPtr domain,
     }
     if (uri_out)
         uri = uri_out; /* Did domainMigratePrepare2 change URI? */
-    assert (uri != NULL);
 
     /* Perform the migration.  The driver isn't supposed to return
      * until the migration is complete.
-- 
1.7.4.4

--
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]