[PATCH] monitor/hmp-cmds: remove redundant check for tls_authz in hmp_info_migrate_parameters

Mao Zhongyi posted 1 patch 4 years, 1 month ago
Failed in applying to current master (apply log)
monitor/hmp-cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] monitor/hmp-cmds: remove redundant check for tls_authz in hmp_info_migrate_parameters
Posted by Mao Zhongyi 4 years, 1 month ago
'params->has_tls_authz = true' has been hardcoded as true in
qmp_query_migrate_parameters, so remove the redundant check.

Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 monitor/hmp-cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index f8be6bbb16..d18826309b 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -461,7 +461,7 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
             params->max_postcopy_bandwidth);
         monitor_printf(mon, "%s: '%s'\n",
             MigrationParameter_str(MIGRATION_PARAMETER_TLS_AUTHZ),
-            params->has_tls_authz ? params->tls_authz : "");
+            params->tls_authz);
     }
 
     qapi_free_MigrationParameters(params);
-- 
2.17.1




Re: [PATCH] monitor/hmp-cmds: remove redundant check for tls_authz in hmp_info_migrate_parameters
Posted by Dr. David Alan Gilbert 4 years ago
* Mao Zhongyi (maozhongyi@cmss.chinamobile.com) wrote:
> 'params->has_tls_authz = true' has been hardcoded as true in
> qmp_query_migrate_parameters, so remove the redundant check.
> 
> Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
> ---
>  monitor/hmp-cmds.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
> index f8be6bbb16..d18826309b 100644
> --- a/monitor/hmp-cmds.c
> +++ b/monitor/hmp-cmds.c
> @@ -461,7 +461,7 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
>              params->max_postcopy_bandwidth);
>          monitor_printf(mon, "%s: '%s'\n",
>              MigrationParameter_str(MIGRATION_PARAMETER_TLS_AUTHZ),
> -            params->has_tls_authz ? params->tls_authz : "");
> +            params->tls_authz);
>      }
>  
>      qapi_free_MigrationParameters(params);

That's OK, but we may as well combine it with the previous one.

Dave

> -- 
> 2.17.1
> 
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK