提交 8b83cc42 编写于 作者: D Daniel P. Berrange

Remove bogus assert() from migration code

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
上级 604708df
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <assert.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <time.h> #include <time.h>
#include <gcrypt.h> #include <gcrypt.h>
...@@ -3374,7 +3373,6 @@ virDomainMigrateVersion1 (virDomainPtr domain, ...@@ -3374,7 +3373,6 @@ virDomainMigrateVersion1 (virDomainPtr domain,
} }
if (uri_out) if (uri_out)
uri = uri_out; /* Did domainMigratePrepare change URI? */ uri = uri_out; /* Did domainMigratePrepare change URI? */
assert (uri != NULL);
/* Perform the migration. The driver isn't supposed to return /* Perform the migration. The driver isn't supposed to return
* until the migration is complete. * until the migration is complete.
...@@ -3464,7 +3462,6 @@ virDomainMigrateVersion2 (virDomainPtr domain, ...@@ -3464,7 +3462,6 @@ virDomainMigrateVersion2 (virDomainPtr domain,
} }
if (uri_out) if (uri_out)
uri = uri_out; /* Did domainMigratePrepare2 change URI? */ uri = uri_out; /* Did domainMigratePrepare2 change URI? */
assert (uri != NULL);
/* Perform the migration. The driver isn't supposed to return /* Perform the migration. The driver isn't supposed to return
* until the migration is complete. * until the migration is complete.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册