aboutsummaryrefslogtreecommitdiff
path: root/monitor/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/misc.c')
-rw-r--r--monitor/misc.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/monitor/misc.c b/monitor/misc.c
index 83d7f4ffde..c7eb673ffd 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -398,7 +398,7 @@ static void hmp_info_trace_events(Monitor *mon, const QDict *qdict)
void qmp_client_migrate_info(const char *protocol, const char *hostname,
bool has_port, int64_t port,
bool has_tls_port, int64_t tls_port,
- bool has_cert_subject, const char *cert_subject,
+ const char *cert_subject,
Error **errp)
{
if (strcmp(protocol, "spice") == 0) {
@@ -1133,7 +1133,7 @@ void monitor_fdsets_cleanup(void)
}
}
-AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
+AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id,
const char *opaque, Error **errp)
{
int fd;
@@ -1146,8 +1146,7 @@ AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque,
goto error;
}
- fdinfo = monitor_fdset_add_fd(fd, has_fdset_id, fdset_id,
- has_opaque, opaque, errp);
+ fdinfo = monitor_fdset_add_fd(fd, has_fdset_id, fdset_id, opaque, errp);
if (fdinfo) {
return fdinfo;
}
@@ -1215,12 +1214,7 @@ FdsetInfoList *qmp_query_fdsets(Error **errp)
fdsetfd_info = g_malloc0(sizeof(*fdsetfd_info));
fdsetfd_info->fd = mon_fdset_fd->fd;
- if (mon_fdset_fd->opaque) {
- fdsetfd_info->has_opaque = true;
- fdsetfd_info->opaque = g_strdup(mon_fdset_fd->opaque);
- } else {
- fdsetfd_info->has_opaque = false;
- }
+ fdsetfd_info->opaque = g_strdup(mon_fdset_fd->opaque);
QAPI_LIST_PREPEND(fdset_info->fds, fdsetfd_info);
}
@@ -1232,8 +1226,7 @@ FdsetInfoList *qmp_query_fdsets(Error **errp)
}
AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id,
- bool has_opaque, const char *opaque,
- Error **errp)
+ const char *opaque, Error **errp)
{
MonFdset *mon_fdset = NULL;
MonFdsetFd *mon_fdset_fd;
@@ -1301,9 +1294,7 @@ AddfdInfo *monitor_fdset_add_fd(int fd, bool has_fdset_id, int64_t fdset_id,
mon_fdset_fd = g_malloc0(sizeof(*mon_fdset_fd));
mon_fdset_fd->fd = fd;
mon_fdset_fd->removed = false;
- if (has_opaque) {
- mon_fdset_fd->opaque = g_strdup(opaque);
- }
+ mon_fdset_fd->opaque = g_strdup(opaque);
QLIST_INSERT_HEAD(&mon_fdset->fds, mon_fdset_fd, next);
fdinfo = g_malloc0(sizeof(*fdinfo));