qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] util: fix some coding style issue
Date: Thu, 28 Jul 2016 09:08:19 +0100	[thread overview]
Message-ID: <20160728080819.GD22677@redhat.com> (raw)
In-Reply-To: <1469691571-10819-3-git-send-email-caoj.fnst@cn.fujitsu.com>

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 <berrange@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
>  util/qemu-sockets.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)

Reviwed-by: Daniel P. Berrange <berrange@redhat.com>


> @@ -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 :|

  reply	other threads:[~2016-07-28  8:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28  7:39 [Qemu-devel] [PATCH 0/3] Remove obsolete non-blocking connect Cao jin
2016-07-28  7:39 ` [Qemu-devel] [PATCH 1/3] util: remove the " Cao jin
2016-07-28  8:07   ` Daniel P. Berrange
2016-07-28  7:39 ` [Qemu-devel] [PATCH 2/3] util: fix some coding style issue Cao jin
2016-07-28  8:08   ` Daniel P. Berrange [this message]
2016-07-28  8:44     ` Cao jin
2016-07-28  7:39 ` [Qemu-devel] [PATCH 3/3] migration/socket: fix typo in file header Cao jin
2016-07-28  8:08   ` Daniel P. Berrange

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=20160728080819.GD22677@redhat.com \
    --to=berrange@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@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).