qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: qemu-devel@nongnu.org
Cc: owasserm@redhat.com, aliguori@us.ibm.com,
	Amos Kong <akong@redhat.com>,
	mdroth@linux.vnet.ibm.com, quintela@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] socket: remove redundant check
Date: Tue, 17 Jul 2012 23:45:50 +0800	[thread overview]
Message-ID: <1342539951-30915-2-git-send-email-akong@redhat.com> (raw)
In-Reply-To: <1342539951-30915-1-git-send-email-akong@redhat.com>

It's aleady in the end of loop, error should be set.

Signed-off-by: Amos Kong <akong@redhat.com>
---
 qemu-sockets.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/qemu-sockets.c b/qemu-sockets.c
index 2ae715d..697e5d8 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -178,9 +178,7 @@ int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp)
                 fprintf(stderr,"%s: bind(%s,%s,%d): %s\n", __FUNCTION__,
                         inet_strfamily(e->ai_family), uaddr, inet_getport(e),
                         strerror(errno));
-                if (!e->ai_next) {
-                    error_set(errp, QERR_SOCKET_BIND_FAILED);
-                }
+                error_set(errp, QERR_SOCKET_BIND_FAILED);
             }
         }
         closesocket(slisten);
-- 
1.7.1

  reply	other threads:[~2012-07-17 15:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-17 15:45 [Qemu-devel] [PATCH 0/2] trivial fix of qemu-sockets.c Amos Kong
2012-07-17 15:45 ` Amos Kong [this message]
2012-07-17 15:45 ` [Qemu-devel] [PATCH 2/2] remove unused include of error.h Amos Kong
2012-08-01  8:59 ` [Qemu-devel] [RESEND PATCH 0/3] trivial fix of qemu-sockets.c Amos Kong
2012-08-01  8:59 ` [Qemu-devel] [RESEND PATCH 1/3] socket: remove redundant check Amos Kong
2012-08-01 10:50   ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-08-01 11:23     ` Peter Maydell
2012-08-01 11:50       ` Markus Armbruster
2012-08-01 11:48     ` Markus Armbruster
2012-08-03  2:59       ` Amos Kong
2012-08-01  8:59 ` [Qemu-devel] [RESEND PATCH 2/3] remove unused include of error.h Amos Kong
2012-08-01  8:59 ` [Qemu-devel] [RESEND PATCH 3/3] socket: clean up redundant assignment Amos Kong

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=1342539951-30915-2-git-send-email-akong@redhat.com \
    --to=akong@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=owasserm@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).