]> xenbits.xensource.com Git - libvirt.git/commitdiff
Fix qemuMigrationToFile nonull annotation
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 5 May 2011 10:30:26 +0000 (11:30 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 5 May 2011 11:53:23 +0000 (12:53 +0100)
The qemuMigrationToFile method was accidentally annotated for
the 'compressor' parameter to be non-null, instead of the
'path' parameter. Thus GCC with -O2, unhelpfully deleted the
entire 'if (compressor == NULL)' block of code during
optimization. Thus NULL was passed to virCommandNew() with
predictably bad results.

* src/qemu/qemu_migration.h: Fix non-null annotation to be
  against path instead of compressor

src/qemu/qemu_migration.h

index f4e86c83ba0087feea7e6b713832830712387bbb..c0f3aa2a2ea08e2d81b27a4ef34ec1934fa969ab 100644 (file)
@@ -64,7 +64,7 @@ int qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
                         int fd, off_t offset, const char *path,
                         const char *compressor,
                         bool is_reg, bool bypassSecurityDriver)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6)
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5)
     ATTRIBUTE_RETURN_CHECK;
 
 #endif /* __QEMU_MIGRATION_H__ */