提交 5e067ba4 编写于 作者: J Ján Tomko

conf: remove NULL check from virDomainQemuMonitorEventNew

The qemu_domain_monitor_event_msg struct in qemu_protocol.x
defines event as a nonnull_string and qemuMonitorJSONIOProcessEvent
also errors out on a non-NULL event.

Drop the check to fix the build with static analysis.

This essentially reverts commit d343e820Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 7611a1ef
...@@ -1934,24 +1934,12 @@ virDomainQemuMonitorEventNew(int id, ...@@ -1934,24 +1934,12 @@ virDomainQemuMonitorEventNew(int id,
0, id, name, uuid, uuidstr))) 0, id, name, uuid, uuidstr)))
return NULL; return NULL;
/* event is mandatory, details are optional */
if (!event) {
virReportError(VIR_ERR_INVALID_ARG,
_("unexpected event=NULL name=%s uuid=%s details=%s"),
name, uuidstr, NULLSTR(details));
goto error;
}
ev->event = g_strdup(event); ev->event = g_strdup(event);
ev->seconds = seconds; ev->seconds = seconds;
ev->micros = micros; ev->micros = micros;
ev->details = g_strdup(details); ev->details = g_strdup(details);
return (virObjectEventPtr)ev; return (virObjectEventPtr)ev;
error:
virObjectUnref(ev);
return NULL;
} }
......
...@@ -321,4 +321,4 @@ virDomainQemuMonitorEventNew(int id, ...@@ -321,4 +321,4 @@ virDomainQemuMonitorEventNew(int id,
long long seconds, long long seconds,
unsigned int micros, unsigned int micros,
const char *details) const char *details)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册