Skip to contentSkip to conversation

qga-win32: remove a redundancy code

PATCH In review Peng Hao 2 participants 2 messages Jul 15, 2017 – Jul 17, 2017

lore
Share & tools
lore

Peng Hao

author
#0 lore raw

PATCH 1/1 qga-win32: remove a redundancy code

In the first line of run_agent,it has set ga_state = s,don't need set ga_state = s again behind.

---
 qga/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qga/main.c +1 -1
index 405c129..dcd6104 100644
@@ -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");
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw

Cc'ing qemu-trivial

Quoted 4 lines · Peng Hao

In the first line of run_agent,it has set ga_state = s,don't need set ga_state = s again behind.

Quoted 18 lines
---
  qga/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
qga/main.c +1 -1
index 405c129..dcd6104 100644
@@ -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");