mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Add non-null annotations to qemuMonitorOpen
Add some non-null annotations to qemuMonitorOpen and also check that the error callback is set, since it is mandatory Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
e2a7f97b2b
commit
1f490138ba
@ -683,11 +683,16 @@ qemuMonitorOpen(virDomainObjPtr vm,
|
||||
{
|
||||
qemuMonitorPtr mon;
|
||||
|
||||
if (!cb || !cb->eofNotify) {
|
||||
if (!cb->eofNotify) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("EOF notify callback must be supplied"));
|
||||
return NULL;
|
||||
}
|
||||
if (!cb->errorNotify) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Error notify callback must be supplied"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (qemuMonitorInitialize() < 0)
|
||||
return NULL;
|
||||
|
@ -145,7 +145,8 @@ char *qemuMonitorUnescapeArg(const char *in);
|
||||
qemuMonitorPtr qemuMonitorOpen(virDomainObjPtr vm,
|
||||
virDomainChrSourceDefPtr config,
|
||||
int json,
|
||||
qemuMonitorCallbacksPtr cb);
|
||||
qemuMonitorCallbacksPtr cb)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
|
||||
|
||||
void qemuMonitorClose(qemuMonitorPtr mon);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user