Hello Peter, On Thu, Jan 13, 2022 at 4:02 AM Peter Xu <pet...@redhat.com> wrote: > > On Thu, Jan 06, 2022 at 07:13:41PM -0300, Leonardo Bras wrote: > > void migration_channel_process_incoming(QIOChannel *ioc) > > { > > - MigrationState *s = migrate_get_current(); > > Error *local_err = NULL; > > > > trace_migration_set_incoming_channel( > > ioc, object_get_typename(OBJECT(ioc))); > > > > - if (s->parameters.tls_creds && > > - *s->parameters.tls_creds && > > + if (migrate_use_tls() && > > !object_dynamic_cast(OBJECT(ioc), > > TYPE_QIO_CHANNEL_TLS)) { > > + MigrationState *s = migrate_get_current(); > > + > > Trivial nit: I'd rather keep the line there; as the movement offers nothing, > imho..
The idea to move the 's' to inside the if block is to make it clear it's only used in this case. But if you think it's better to keep it at the beginning of the function, sure, I can change that. Just let me know. > > > migration_tls_channel_process_incoming(s, ioc, &local_err); > > } else { > > migration_ioc_register_yank(ioc); > > Reviewed-by: Peter Xu <pet...@redhat.com> > Thanks! > -- > Peter Xu > Best regards, Leo