summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-14 10:57:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-14 10:57:08 +0000
commit5fdf364a22bf60ab2f4bfa60185eaf85afd28cd5 (patch)
treeab1df647c776e25e909f14fb86baace897d26517
parent09e1cd32a322107f66869eae182fd5e4ea6f6587 (diff)
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
-rw-r--r--src/socketengine_ports.cpp16
1 files changed, 9 insertions, 7 deletions
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;
}
}