From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSgMn-00051R-Lo for qemu-devel@nongnu.org; Thu, 28 Jul 2016 04:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSgMj-0006re-3K for qemu-devel@nongnu.org; Thu, 28 Jul 2016 04:08:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSgMi-0006rR-TR for qemu-devel@nongnu.org; Thu, 28 Jul 2016 04:08:25 -0400 Date: Thu, 28 Jul 2016 09:08:19 +0100 From: "Daniel P. Berrange" Message-ID: <20160728080819.GD22677@redhat.com> Reply-To: "Daniel P. Berrange" References: <1469691571-10819-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1469691571-10819-3-git-send-email-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1469691571-10819-3-git-send-email-caoj.fnst@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH 2/3] util: fix some coding style issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin Cc: qemu-devel@nongnu.org, Gerd Hoffmann , Paolo Bonzini On Thu, Jul 28, 2016 at 03:39:30PM +0800, Cao jin wrote: > Fix some coding style issues found in removing NonBlockingConnectHandler. > > Cc: Daniel P. Berrange > Cc: Gerd Hoffmann > Cc: Paolo Bonzini > Signed-off-by: Cao jin > --- > util/qemu-sockets.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) Reviwed-by: Daniel P. Berrange > @@ -443,12 +443,16 @@ static int inet_dgram_saddr(InetSocketAddress *sraddr, > return sock; > > err: > - if (-1 != sock) > + if (-1 != sock) { I'd probably fix the yoda-conditional here too. ie sock != -1 instead. > closesocket(sock); > - if (local) > + } > + if (local) { > freeaddrinfo(local); > - if (peer) > + } > + if (peer) { > freeaddrinfo(peer); > + } > + > return -1; > } Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|