Remove NULL check from virObjectEventStateQueue and add NULL check to
virObjectEventStateQueueRemote
Remove NULL check around call to virObjectEventStateQueueRemote in
remote_driver.c
Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
src/conf/object_event.c | 6 +++---
src/remote/remote_driver.c | 3 +--
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/conf/object_event.c b/src/conf/object_event.c
index 826197000b..dd5c6ff32d 100644
--- a/src/conf/object_event.c
+++ b/src/conf/object_event.c
@@ -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);
}
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index c22993ce9e..fbec5c727b 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -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);
}
--
2.17.1