]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove bogus assert() from migration code
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 20 Apr 2011 10:39:51 +0000 (11:39 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 9 May 2011 16:59:04 +0000 (17:59 +0100)
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

index e74e9774ef4a4cf96128d1f9d30af4dea0fe9d96..abacf85911e75c7fe37a7cbc1db975cfbc66b02d 100644 (file)
@@ -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>
@@ -3374,7 +3373,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.
@@ -3464,7 +3462,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.