From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsYFm-0007CE-8l for qemu-devel@nongnu.org; Fri, 07 Oct 2016 12:44:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsYFg-00016z-0J for qemu-devel@nongnu.org; Fri, 07 Oct 2016 12:44:09 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54371 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsYFf-00016a-Pu for qemu-devel@nongnu.org; Fri, 07 Oct 2016 12:44:03 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u97Ghqn0133258 for ; Fri, 7 Oct 2016 12:44:03 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 25xe1xbje6-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 07 Oct 2016 12:44:03 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Oct 2016 10:44:02 -0600 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <1475772018-27484-2-git-send-email-stefanha@redhat.com> References: <1475772018-27484-1-git-send-email-stefanha@redhat.com> <1475772018-27484-2-git-send-email-stefanha@redhat.com> Date: Fri, 07 Oct 2016 11:01:01 -0500 Message-Id: <20161007160101.9563.784@loki> Subject: Re: [Qemu-devel] [PATCH 1/4] qga: drop unused sockaddr in accept(2) call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Quoting Stefan Hajnoczi (2016-10-06 11:40:15) > ga_channel_listen_accept() is currently hard-coded to support only > AF_UNIX because the struct sockaddr_un type is used. This function > should work with any address family. > = > Drop the sockaddr since the client address is unused and is an optional > argument to accept(2). > = > Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael Roth > --- > qga/channel-posix.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > = > diff --git a/qga/channel-posix.c b/qga/channel-posix.c > index bb65d8b..bf32158 100644 > --- a/qga/channel-posix.c > +++ b/qga/channel-posix.c > @@ -26,13 +26,10 @@ static gboolean ga_channel_listen_accept(GIOChannel *= channel, > GAChannel *c =3D data; > int ret, client_fd; > bool accepted =3D false; > - struct sockaddr_un addr; > - socklen_t addrlen =3D sizeof(addr); > = > g_assert(channel !=3D NULL); > = > - client_fd =3D qemu_accept(g_io_channel_unix_get_fd(channel), > - (struct sockaddr *)&addr, &addrlen); > + client_fd =3D qemu_accept(g_io_channel_unix_get_fd(channel), NULL, N= ULL); > if (client_fd =3D=3D -1) { > g_warning("error converting fd to gsocket: %s", strerror(errno)); > goto out; > -- = > 2.7.4 >=20