events: move NULL check to EventStateQueueRemote

Remove NULL check around call to virObjectEventStateQueueRemote in
remote_driver.c.

Signed-off-by: Anya Harter <aharter@redhat.com>
This commit is contained in:
Anya Harter 2018-06-11 15:38:18 -04:00 committed by Pavel Hrdina
parent 031eb8f6dc
commit aad3a0b5f8
2 changed files with 4 additions and 5 deletions

View File

@ -744,6 +744,9 @@ virObjectEventStateQueueRemote(virObjectEventStatePtr state,
virObjectEventPtr event,
int remoteID)
{
if (!event)
return;
if (state->timer < 0) {
virObjectUnref(event);
return;
@ -776,9 +779,6 @@ void
virObjectEventStateQueue(virObjectEventStatePtr state,
virObjectEventPtr event)
{
if (!event)
return;
virObjectEventStateQueueRemote(state, event, -1);
}

View File

@ -4435,8 +4435,7 @@ static void
remoteEventQueue(struct private_data *priv, virObjectEventPtr event,
int remoteID)
{
if (event)
virObjectEventStateQueueRemote(priv->eventState, event, remoteID);
virObjectEventStateQueueRemote(priv->eventState, event, remoteID);
}