On Fri, Oct 08, 2021 at 10:19:05 +0200, Kristina Hanicova wrote: > Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx> > --- > src/qemu/qemu_migration.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > index 71edcd5c62..48df080c15 100644 > --- a/src/qemu/qemu_migration.c > +++ b/src/qemu/qemu_migration.c > @@ -4012,7 +4012,6 @@ qemuMigrationSrcRun(virQEMUDriver *driver, > g_autofree char *tlsAlias = NULL; > qemuMigrationIOThread *iothread = NULL; > VIR_AUTOCLOSE fd = -1; > - unsigned long migrate_speed = resource ? resource : priv->migMaxBandwidth; > unsigned long restore_max_bandwidth = priv->migMaxBandwidth; > virErrorPtr orig_err = NULL; > unsigned int cookieFlags = 0; > @@ -4026,7 +4025,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, > g_autofree char *timestamp = NULL; > int rc; > > - priv->migMaxBandwidth = migrate_speed; > + priv->migMaxBandwidth = resource ? resource : priv->migMaxBandwidth; Perhaps if (resource > 0) priv->migMaxBandwidth = resource; instead? It's not on a single line, but the else branch is quite redundant. Not a big deal, though. Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>