libxl_qmp: Simplify qmp_response_type() prototype
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 25 May 2018 15:18:45 +0000 (16:18 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 21 Aug 2018 11:16:02 +0000 (12:16 +0100)
Remove the libxl__qmp_handler* argument so the function can be reused
later in a different context.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_qmp.c

index c5e05e5679e3390863e56236575dcf7fe6b4dbfa..b2b55b4853cf33bce093cb2d961527dd7707b54c 100644 (file)
@@ -273,8 +273,7 @@ static int enable_qmp_capabilities(libxl__qmp_handler *qmp)
  * Helpers
  */
 
-static libxl__qmp_message_type qmp_response_type(libxl__qmp_handler *qmp,
-                                                 const libxl__json_object *o)
+static libxl__qmp_message_type qmp_response_type(const libxl__json_object *o)
 {
     libxl__qmp_message_type type;
     libxl__json_map_node *node = NULL;
@@ -340,7 +339,7 @@ static int qmp_handle_response(libxl__gc *gc, libxl__qmp_handler *qmp,
 {
     libxl__qmp_message_type type = LIBXL__QMP_MESSAGE_TYPE_INVALID;
 
-    type = qmp_response_type(qmp, resp);
+    type = qmp_response_type(resp);
     LOGD(DEBUG, qmp->domid, "message type: %s", libxl__qmp_message_type_to_string(type));
 
     switch (type) {