From patchwork Tue Jul 17 15:45:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amos Kong X-Patchwork-Id: 171465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 41EDE2C00C1 for ; Wed, 18 Jul 2012 01:46:08 +1000 (EST) Received: from localhost ([::1]:58136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr9yQ-0003dt-4a for incoming@patchwork.ozlabs.org; Tue, 17 Jul 2012 11:46:06 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr9y9-0003co-5L for qemu-devel@nongnu.org; Tue, 17 Jul 2012 11:45:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr9y4-00016Q-Cf for qemu-devel@nongnu.org; Tue, 17 Jul 2012 11:45:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr9y3-000163-Kv for qemu-devel@nongnu.org; Tue, 17 Jul 2012 11:45:44 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6HFjcCw011455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Jul 2012 11:45:38 -0400 Received: from dhcp-8-167.nay.redhat.com ([10.66.7.126]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6HFjVAS028039; Tue, 17 Jul 2012 11:45:35 -0400 From: Amos Kong To: qemu-devel@nongnu.org Date: Tue, 17 Jul 2012 23:45:50 +0800 Message-Id: <1342539951-30915-2-git-send-email-akong@redhat.com> In-Reply-To: <1342539951-30915-1-git-send-email-akong@redhat.com> References: <1342539951-30915-1-git-send-email-akong@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: owasserm@redhat.com, aliguori@us.ibm.com, Amos Kong , mdroth@linux.vnet.ibm.com, quintela@redhat.com Subject: [Qemu-devel] [PATCH 1/2] socket: remove redundant check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It's aleady in the end of loop, error should be set. Signed-off-by: Amos Kong --- 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);