]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
libxl: fix return code in qmp_synchronous_send
authorOlaf Hering <olaf@aepfle.de>
Thu, 17 May 2018 14:29:57 +0000 (16:29 +0200)
committerWei Liu <wei.liu2@citrix.com>
Tue, 26 Jun 2018 11:43:10 +0000 (12:43 +0100)
Use error code from libxl namespace, a plain -1 is not valid in this context.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_qmp.c

index be1fda18baddf202fb762bdfd22140817b754ce2..0fe42813bf203423a6048dbc3db96a8e000b90e2 100644 (file)
@@ -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;