summary refs log tree commit diff stats
path: root/qapi/qmp-dispatch.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-03-16 18:18:24 +0100
committerMarkus Armbruster <armbru@redhat.com>2020-03-17 21:43:12 +0100
commitf0ccc00be16e6f4c925f90305e2d4ed9dd11c8fd (patch)
treef86a8df637eb568c4ee834292840363231c3f197 /qapi/qmp-dispatch.c
parentdf4097aeaf71e1ff0574222760821467a7c86c0f (diff)
downloadfocaccia-qemu-f0ccc00be16e6f4c925f90305e2d4ed9dd11c8fd.tar.gz
focaccia-qemu-f0ccc00be16e6f4c925f90305e2d4ed9dd11c8fd.zip
qmp: constify QmpCommand and list
Since 0b69f6f72ce47a37a749b056b6d5ec64c61f11e8 "qapi: remove
qmp_unregister_command()", the command list can be declared const.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Message-Id: <20200316171824.2319695-1-marcandre.lureau@redhat.com>
[Rebased]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi/qmp-dispatch.c')
-rw-r--r--qapi/qmp-dispatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 44fc368d61..c30c7ff9e1 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -88,14 +88,14 @@ bool qmp_is_oob(const QDict *dict)
         && !qdict_haskey(dict, "execute");
 }
 
-QDict *qmp_dispatch(QmpCommandList *cmds, QObject *request,
+QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
                     bool allow_oob)
 {
     Error *err = NULL;
     bool oob;
     const char *command;
     QDict *args;
-    QmpCommand *cmd;
+    const QmpCommand *cmd;
     QDict *dict;
     QObject *id;
     QObject *ret = NULL;