qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 03/13] libqtest: Remove dead qtest_instances


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v5 03/13] libqtest: Remove dead qtest_instances variable
Date: Fri, 18 Aug 2017 18:33:57 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 08/18/2017 06:15 PM, Eric Blake wrote:
Prior to commit 063c23d9, we were tracking a list of parallel
qtest objects, in order to safely clean up a SIGABRT handler
only after the last connection quits.  But when we switched to
more of glib's infrastructure, the list became dead code that
is never assigned to.

Signed-off-by: Eric Blake <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

---
  tests/libqtest.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tests/libqtest.c b/tests/libqtest.c
index b9a1f180e1..3f956f09fc 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -42,7 +42,6 @@ struct QTestState
  };

  static GHookList abrt_hooks;
-static GList *qtest_instances;
  static struct sigaction sigact_old;

  #define g_assert_no_errno(ret) do { \
@@ -240,13 +239,10 @@ QTestState *qtest_init(const char *extra_args)

  void qtest_quit(QTestState *s)
  {
-    qtest_instances = g_list_remove(qtest_instances, s);
      g_hook_destroy_link(&abrt_hooks, g_hook_find_data(&abrt_hooks, TRUE, s));

      /* Uninstall SIGABRT handler on last instance */
-    if (!qtest_instances) {
-        cleanup_sigabrt_handler();
-    }
+    cleanup_sigabrt_handler();

      kill_qemu(s);
      close(s->fd);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]