summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-08-21 05:49:18 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-08-21 05:49:18 -0400
commit4be1ae3cf874292e95afdf9811c51533bcde79f7 (patch)
tree30bbf073f78dd1d67c3a6cd810f4e70f5b576037
parent016593f2e91564dc9d675ae42dfd37059f9b5589 (diff)
downloadgem5-4be1ae3cf874292e95afdf9811c51533bcde79f7.tar.xz
EventManager: Remove test for NULL pointer in constructor
This patch tidies up the EventManager constructor and prunes a corner case where the EventManager would initialise its eventq pointer to NULL. This would cause segmentation faults on actual use and should never happen.
-rw-r--r--src/sim/eventq.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index c46902889..5362dcf34 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -432,7 +432,7 @@ class EventManager
public:
EventManager(EventManager &em) : eventq(em.eventq) {}
- EventManager(EventManager *em) : eventq(em ? em->eventq : NULL) {}
+ EventManager(EventManager *em) : eventq(em->eventq) {}
EventManager(EventQueue *eq) : eventq(eq) {}
EventQueue *