提交 a745d83f 编写于 作者: P Peter Krempa

qemu: monitor: @running in qemuMonitorGetStatus is always non-NULL

Add the attribute and remove the check.
上级 81d14c02
......@@ -1586,9 +1586,9 @@ qemuMonitorGetStatus(qemuMonitorPtr mon,
{
VIR_DEBUG("mon=%p, running=%p, reason=%p", mon, running, reason);
if (!mon || !running) {
if (!mon) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("both monitor and running must not be NULL"));
_("monitor must not be NULL"));
return -1;
}
......
......@@ -335,7 +335,8 @@ int qemuMonitorVMStatusToPausedReason(const char *status);
int qemuMonitorGetStatus(qemuMonitorPtr mon,
bool *running,
virDomainPausedReason *reason);
virDomainPausedReason *reason)
ATTRIBUTE_NONNULL(2);
int qemuMonitorSystemReset(qemuMonitorPtr mon);
int qemuMonitorSystemPowerdown(qemuMonitorPtr mon);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册