From: Andreas Hansson Date: Tue, 21 Aug 2012 09:49:18 +0000 (-0400) Subject: EventManager: Remove test for NULL pointer in constructor X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4be1ae3cf874292e95afdf9811c51533bcde79f7;p=gem5.git 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. --- 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 *