summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-12-17 02:40:02 +0100
committerattilamolnar <attilamolnar@hush.com>2013-03-25 16:22:14 +0100
commit31344bbedf40756d2476062c8426413872d7d4de (patch)
treed973fc6bd9095d088354f21aa5fe35fca845c828
parente55cafb93f4d98ac0a890416bf18be8e3e76affc (diff)
m_xline_db Fix pointless excessive stack usage in ReadDatabase()
-rw-r--r--src/modules/m_xline_db.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index 1c5125805..5e83478c3 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -169,7 +169,6 @@ class ModuleXLineDB : public Module
{
FILE *f;
char linebuf[MAXBUF];
- unsigned int lineno = 0;
f = fopen(xlinedbpath.c_str(), "r");
if (!f)
@@ -201,16 +200,14 @@ class ModuleXLineDB : public Module
c++;
}
- // Smart man might think of initing to 1, and moving this to the bottom. Don't. We use continue in this loop.
- lineno++;
// Inspired by the command parser. :)
irc::tokenstream tokens(linebuf);
int items = 0;
- std::string command_p[MAXPARAMETERS];
+ std::string command_p[7];
std::string tmp;
- while (tokens.GetToken(tmp) && (items < MAXPARAMETERS))
+ while (tokens.GetToken(tmp) && (items < 7))
{
command_p[items] = tmp;
items++;