aboutsummaryrefslogtreecommitdiff
path: root/monitor
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 /monitor
parentdf4097aeaf71e1ff0574222760821467a7c86c0f (diff)
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 'monitor')
-rw-r--r--monitor/monitor-internal.h2
-rw-r--r--monitor/qmp-cmds-control.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h
index 3e6baba88f..8f60ccc70a 100644
--- a/monitor/monitor-internal.h
+++ b/monitor/monitor-internal.h
@@ -133,7 +133,7 @@ typedef struct {
* qmp_capabilities succeeds, we go into command mode, and
* @command becomes &qmp_commands.
*/
- QmpCommandList *commands;
+ const QmpCommandList *commands;
bool capab_offered[QMP_CAPABILITY__MAX]; /* capabilities offered */
bool capab[QMP_CAPABILITY__MAX]; /* offered and accepted */
/*
diff --git a/monitor/qmp-cmds-control.c b/monitor/qmp-cmds-control.c
index 5cd9bb817c..8f04cfa6e6 100644
--- a/monitor/qmp-cmds-control.c
+++ b/monitor/qmp-cmds-control.c
@@ -101,7 +101,7 @@ VersionInfo *qmp_query_version(Error **errp)
return info;
}
-static void query_commands_cb(QmpCommand *cmd, void *opaque)
+static void query_commands_cb(const QmpCommand *cmd, void *opaque)
{
CommandInfoList *info, **list = opaque;