qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@linux.vnet.ibm.com, Jes.Sorensen@redhat.com,
	agl@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com,
	lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH] guest agent: qemu-ga, remove unused variables
Date: Wed, 20 Jul 2011 15:00:14 -0500	[thread overview]
Message-ID: <1311192014-21655-1-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1311108115-27128-4-git-send-email-mdroth@linux.vnet.ibm.com>

---
 qemu-ga.c |   25 ++++---------------------
 1 files changed, 4 insertions(+), 21 deletions(-)

diff --git a/qemu-ga.c b/qemu-ga.c
index 4530d3d..6e2f61f 100644
--- a/qemu-ga.c
+++ b/qemu-ga.c
@@ -37,10 +37,8 @@
 struct GAState {
     JSONMessageParser parser;
     GMainLoop *main_loop;
-    guint conn_id;
     GSocket *conn_sock;
     GIOChannel *conn_channel;
-    guint listen_id;
     GSocket *listen_sock;
     GIOChannel *listen_channel;
     const char *path;
@@ -393,7 +391,6 @@ static gboolean conn_channel_read(GIOChannel *channel, GIOCondition condition,
 static int conn_channel_add(GAState *s, int fd)
 {
     GIOChannel *conn_channel;
-    guint conn_id;
     GError *err = NULL;
 
     g_assert(s && !s->conn_channel);
@@ -405,15 +402,9 @@ static int conn_channel_add(GAState *s, int fd)
         g_error_free(err);
         return -1;
     }
-    conn_id = g_io_add_watch(conn_channel, G_IO_IN | G_IO_HUP,
-                             conn_channel_read, s);
-    if (err != NULL) {
-        g_warning("error adding io watch: %s", err->message);
-        g_error_free(err);
-        return -1;
-    }
+    g_io_add_watch(conn_channel, G_IO_IN | G_IO_HUP,
+                   conn_channel_read, s);
     s->conn_channel = conn_channel;
-    s->conn_id = conn_id;
     return 0;
 }
 
@@ -450,7 +441,6 @@ out:
 static int listen_channel_add(GAState *s, int listen_fd, bool new)
 {
     GError *err = NULL;
-    guint listen_id;
 
     if (new) {
         s->listen_channel = g_io_channel_unix_new(listen_fd);
@@ -464,13 +454,8 @@ static int listen_channel_add(GAState *s, int listen_fd, bool new)
             return -1;
         }
     }
-    listen_id = g_io_add_watch(s->listen_channel, G_IO_IN,
-                               listen_channel_accept, s);
-    if (err != NULL) {
-        g_warning("error adding io watch: %s", err->message);
-        g_error_free(err);
-        return -1;
-    }
+    g_io_add_watch(s->listen_channel, G_IO_IN,
+                   listen_channel_accept, s);
     return 0;
 }
 
@@ -494,7 +479,6 @@ static void conn_channel_close(GAState *s)
     }
     g_io_channel_unref(s->conn_channel);
     s->conn_channel = NULL;
-    s->conn_id = 0;
 out_noclose:
     return;
 }
@@ -644,7 +628,6 @@ int main(int argc, char **argv)
     g_thread_init(NULL);
 
     s = qemu_mallocz(sizeof(GAState));
-    s->conn_id = 0;
     s->conn_channel = NULL;
     s->path = path;
     s->method = method;
-- 
1.7.0.4

  parent reply	other threads:[~2011-07-20 20:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 20:41 [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v8 Michael Roth
2011-07-19 20:41 ` [Qemu-devel] [PATCH v8 1/4] qerror: add QERR_JSON_PARSE_ERROR to qerror.c Michael Roth
2011-07-19 20:41 ` [Qemu-devel] [PATCH v8 2/4] guest agent: command state class Michael Roth
2011-07-19 20:41 ` [Qemu-devel] [PATCH v8 3/4] guest agent: qemu-ga daemon Michael Roth
2011-07-20 17:56   ` Luiz Capitulino
2011-07-20 19:25     ` Michael Roth
2011-07-20 19:31       ` Luiz Capitulino
2011-07-20 20:01         ` Michael Roth
2011-07-20 20:05           ` Michael Roth
2011-07-20 20:12             ` Luiz Capitulino
2011-07-20 20:00   ` Michael Roth [this message]
2011-07-20 20:19   ` [Qemu-devel] [PATCH] " Michael Roth
2011-07-23 10:07     ` Alexander Graf
2011-07-23 10:33       ` Alexander Graf
2011-07-23 16:06       ` Michael Roth
2011-07-23 16:10         ` Anthony Liguori
2011-07-23 19:23           ` Jes Sorensen
2011-07-23 19:38             ` Alexander Graf
2011-07-23 16:10         ` Anthony Liguori
2011-07-23 16:43           ` Michael Roth
2011-07-23 16:49             ` Anthony Liguori
2011-07-23 18:35               ` Alexander Graf
2011-07-23 19:12                 ` Anthony Liguori
2011-07-23 19:20                   ` Alexander Graf
2011-07-23 18:34             ` Alexander Graf
2011-07-23 19:14               ` Anthony Liguori
2011-07-23 19:22                 ` Alexander Graf
2011-07-23 21:12                   ` Anthony Liguori
2011-07-23 21:34                     ` Alexander Graf
2011-07-19 20:41 ` [Qemu-devel] [PATCH v8 4/4] guest agent: add guest agent RPCs/commands Michael Roth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1311192014-21655-1-git-send-email-mdroth@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=agl@linux.vnet.ibm.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).