xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
	Harmandeep Kaur <write.harmandeep@gmail.com>,
	xen-devel@lists.xenproject.org
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] libxl: fix handling returns in libxl_get_version_info()
Date: Thu, 11 Feb 2016 10:21:14 +0000	[thread overview]
Message-ID: <1455186074.814.29.camel@citrix.com> (raw)
In-Reply-To: <1455184090.3148.275.camel@citrix.com>

On Thu, 2016-02-11 at 10:48 +0100, Dario Faggioli wrote:
> I think it would be better if you make the patch in such a way that the
> final code would look like this:
> 
>     r = xc_version(ctx->xch, XENVER_extraversion, &u.xen_extra);
>     if ( r < 0 )
>         goto out;
>     info->xen_version_extra = libxl__strdup(NOGC, u.xen_extra);

That is, each "paragraph" consists of:

    call a variant of xc_version
    check for errors in that call
    propagate results of that call to info->... as necessary

and I agree. FWIW CODING_STYLE also allows (but doesn't mandate) for
    if ( r < 0 ) goto out;
i.e. on a single line, which Harmandeep might prefer here for brevity.

Ian

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-02-11 10:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11  8:30 [PATCH] libxl: fix handling returns in libxl_get_version_info() Harmandeep Kaur
2016-02-11  9:48 ` Dario Faggioli
2016-02-11 10:21   ` Ian Campbell [this message]
2016-02-12 10:52   ` Harmandeep Kaur
2016-02-12 11:00     ` Dario Faggioli
2016-02-12 11:04       ` Harmandeep Kaur
2016-02-12 11:12         ` Dario Faggioli

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=1455186074.814.29.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=write.harmandeep@gmail.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 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).