libxl_qmp: Simplify qmp_response_type() prototype

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>
This commit is contained in:
Anthony PERARD authored and Wei Liu committed 2018-08-21 12:16:02 +01:00
1 parent 7fbaf06d2d
commit a0816c2006
1 file changed
+2 -3
+2 -3
View 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) {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.