[Qemu-devel] [PATCH] qga-win32: remove a redundancy code

Peng Hao posted 1 patch 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1500158641-23033-1-git-send-email-peng.hao2@zte.com.cn
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
qga/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] qga-win32: remove a redundancy code
Posted by Peng Hao 6 years, 9 months ago
In the first line of run_agent,it has set ga_state = s,don't need
set ga_state = s again behind.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 qga/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/main.c b/qga/main.c
index 405c129..dcd6104 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1314,7 +1314,7 @@ static int run_agent(GAState *s, GAConfig *config, int socket_activation)
     ga_command_state_init(s, s->command_state);
     ga_command_state_init_all(s->command_state);
     json_message_parser_init(&s->parser, process_event);
-    ga_state = s;
+
 #ifndef _WIN32
     if (!register_signal_handlers()) {
         g_critical("failed to register signal handlers");
-- 
1.8.3.1



Re: [Qemu-devel] [PATCH] qga-win32: remove a redundancy code
Posted by Philippe Mathieu-Daudé 6 years, 9 months ago
Cc'ing qemu-trivial

On 07/15/2017 07:44 PM, Peng Hao wrote:
> In the first line of run_agent,it has set ga_state = s,don't need
> set ga_state = s again behind.
> 
> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>   qga/main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qga/main.c b/qga/main.c
> index 405c129..dcd6104 100644
> --- a/qga/main.c
> +++ b/qga/main.c
> @@ -1314,7 +1314,7 @@ static int run_agent(GAState *s, GAConfig *config, int socket_activation)
>       ga_command_state_init(s, s->command_state);
>       ga_command_state_init_all(s->command_state);
>       json_message_parser_init(&s->parser, process_event);
> -    ga_state = s;
> +
>   #ifndef _WIN32
>       if (!register_signal_handlers()) {
>           g_critical("failed to register signal handlers");
>