All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
	qemu list <qemu-devel@nongnu.org>,
	agl@us.ibm.com
Subject: [Qemu-devel] Re: [PATCH] balloon: Don't try fetching info if machine is stopped
Date: Thu, 19 Aug 2010 09:56:16 +0200	[thread overview]
Message-ID: <4C6CE3A0.80802@redhat.com> (raw)
In-Reply-To: <d93a60e33f51a95242bf0c927f15003e834727c8.1282191270.git.amit.shah@redhat.com>

On 08/19/2010 06:14 AM, Amit Shah wrote:
> +    get_cached_data = 0;
> +    if (!vm_running) {
> +        get_cached_data = 1;
> +    }

     get_cached_data = !vm_running;

Alternatively, see below...

> +    ret = qemu_balloon_status(cb, opaque, get_cached_data);
>       if (!ret) {

Piggybacking on the existing coding style thread, here

     ret = qemu_balloon_status(cb, opaque, !vm_running);

would be quite hard to read indeed.  Maybe we can use something like this:

     ret = qemu_balloon_status(cb, opaque,
			      /*get_cached_data=*/ !vm_running);

?

Paolo

      reply	other threads:[~2010-08-19  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19  4:14 [Qemu-devel] [PATCH] balloon: Don't try fetching info if machine is stopped Amit Shah
2010-08-19  7:56 ` Paolo Bonzini [this message]

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=4C6CE3A0.80802@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agl@us.ibm.com \
    --cc=amit.shah@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.