xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v1] libxl: fix return code in qmp_synchronous_send
Date: Fri, 18 May 2018 09:59:18 +0100	[thread overview]
Message-ID: <20180518085917.6wplrtzy6dxrel2u@citrix.com> (raw)
In-Reply-To: <20180517142957.2963-1-olaf@aepfle.de>

On Thu, May 17, 2018 at 04:29:57PM +0200, Olaf Hering wrote:
> Use error code from libxl namespace, a plain -1 is not valid in this context.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

While this function doesn't have libxl prefix, its return value does get
returned directly by various libxl functions. Instead of fixing all the
callers, I'm fine with this change.

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/libxl/libxl_qmp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c
> index be1fda18ba..0fe42813bf 100644
> --- a/tools/libxl/libxl_qmp.c
> +++ b/tools/libxl/libxl_qmp.c
> @@ -627,7 +627,7 @@ static int qmp_synchronous_send(libxl__qmp_handler *qmp, const char *cmd,
>  
>      id = qmp_send(qmp, cmd, args, callback, opaque, &context);
>      if (id <= 0) {
> -        return -1;
> +        return ERROR_FAIL;
>      }
>      qmp->wait_for_id = id;
>  

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2018-05-18  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 14:29 [PATCH v1] libxl: fix return code in qmp_synchronous_send Olaf Hering
2018-05-18  8:59 ` Wei Liu [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=20180518085917.6wplrtzy6dxrel2u@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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).