[libvirt] [PATCH] qemu: remove dead assignment

Laine Stump laine at laine.org
Wed May 4 04:47:11 UTC 2011


On 05/03/2011 05:08 PM, Eric Blake wrote:
> Detected by clang.
>
> * src/qemu/qemu_migration.c (qemuMigrationToFile): Nothing later
> uses is_reg.
> ---
>   src/qemu/qemu_migration.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 7f4b111..6c5bf66 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -1311,7 +1311,6 @@ qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
>           if (virSecurityManagerSetFDLabel(driver->securityManager, vm,
>                                            compressor ? pipeFD[1] : fd)<  0)
>               goto cleanup;
> -        is_reg = true;
>           bypassSecurityDriver = true;
>       } else {
>           /* Phooey - we have to fall back on exec migration, where qemu

ACK, but I wonder if this code used to live in a function where is_reg 
*was* used below, was moved into this helper function, and now the 
function that's calling it is doing the wrong thing afterwards because 
it's expecting is_reg to be set to true (and it's not because it was 
passed by value rather than reference). It *seems* not (based on the two 
places qemuMigrationToFile() is called), but just the fact that this was 
there in the first place raised my eyebrow so I thought I should mention 
it...



More information about the libvir-list mailing list