All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com,
	ian.campbell@citrix.com
Subject: Re: [PATCH] tools/libxl: Correctly check if libxl_get_scheduler has failed
Date: Thu, 20 Mar 2014 15:09:41 +0000	[thread overview]
Message-ID: <532B04B5.7040606@linaro.org> (raw)
In-Reply-To: <21290.60349.509788.373481@mariner.uk.xensource.com>

Hi Ian,

On 03/20/2014 01:23 PM, Ian Jackson wrote:
> Julien Grall writes ("[PATCH] tools/libxl: Correctly check if libxl_get_scheduler has failed"):
>> libxl_get_scheduler will return an enum, therefore checking if the value
>> is negative is wrong.
> 
> Gah.  enums in C are so hateful.
> 
>> -    if ((sched = libxl_get_scheduler(ctx)) < 0) {
>> +    if ((int)(sched = libxl_get_scheduler(ctx)) < 0) {
> 
> I'm afraid this isn't the right fix.  The right fix is not to use the
> enum type at all.  libxl_get_scheduler, and the "sched" local, should
> be ints.

Thanks. I will rework the patch.

Regards,

-- 
Julien Grall

      reply	other threads:[~2014-03-20 15:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19 23:42 [PATCH] tools/libxl: Correctly check if libxl_get_scheduler has failed Julien Grall
2014-03-20 13:23 ` Ian Jackson
2014-03-20 15:09   ` Julien Grall [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=532B04B5.7040606@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xenproject.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 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.