From 5fdf364a22bf60ab2f4bfa60185eaf85afd28cd5 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 14 Apr 2007 10:57:08 +0000 Subject: Add a pair of curly braces because gcc will whine otherwise about declaration of a variable within a case statement git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6790 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengine_ports.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/socketengine_ports.cpp') diff --git a/src/socketengine_ports.cpp b/src/socketengine_ports.cpp index 18c931748..5a8c616a5 100644 --- a/src/socketengine_ports.cpp +++ b/src/socketengine_ports.cpp @@ -104,15 +104,17 @@ int PortsEngine::DispatchEvents() { switch (this->events[i].portev_source) { - case PORT_SOURCE_FD: - int fd = this->events[i].portev_object; - if (ref[fd]) + case PORT_SOURCE_FD: { - // reinsert port for next time around - port_associate(EngineHandle, PORT_SOURCE_FD, fd, POLLRDNORM, ref[fd]); - ref[fd]->HandleEvent((this->events[i].portev_events & POLLRDNORM) ? EVENT_READ : EVENT_WRITE); + int fd = this->events[i].portev_object; + if (ref[fd]) + { + // reinsert port for next time around + port_associate(EngineHandle, PORT_SOURCE_FD, fd, POLLRDNORM, ref[fd]); + ref[fd]->HandleEvent((this->events[i].portev_events & POLLRDNORM) ? EVENT_READ : EVENT_WRITE); + } } - default: + default: break; } } -- cgit v1.2.3