* [PATCH v1] libxl: fix return code in qmp_synchronous_send
@ 2018-05-17 14:29 Olaf Hering
2018-05-18 8:59 ` Wei Liu
0 siblings, 1 reply; 2+ messages in thread
From: Olaf Hering @ 2018-05-17 14:29 UTC (permalink / raw)
To: xen-devel; +Cc: Wei Liu, Olaf Hering, Ian Jackson
Use error code from libxl namespace, a plain -1 is not valid in this context.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] libxl: fix return code in qmp_synchronous_send
2018-05-17 14:29 [PATCH v1] libxl: fix return code in qmp_synchronous_send Olaf Hering
@ 2018-05-18 8:59 ` Wei Liu
0 siblings, 0 replies; 2+ messages in thread
From: Wei Liu @ 2018-05-18 8:59 UTC (permalink / raw)
To: Olaf Hering; +Cc: Wei Liu, Ian Jackson, xen-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-18 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).