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

Add the attribute and remove the check.
This commit is contained in:
Peter Krempa 2015-04-14 17:00:23 +02:00
parent 81d14c0252
commit a745d83fe0
2 changed files with 4 additions and 3 deletions

View File

@ -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;
}

View File

@ -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);