From 4be1ae3cf874292e95afdf9811c51533bcde79f7 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Tue, 21 Aug 2012 05:49:18 -0400 Subject: [PATCH] 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. --- src/sim/eventq.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 * -- 2.30.2