summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 02:08:53 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 02:08:53 +0000
commit114fb0958fc9544d9b5ff93013a0251bf3322aff (patch)
tree569ea14f029be9d613878d8c4639fcf8f814f133 /src
parent307feb8bd4675e159063e957c020e02bb33c0093 (diff)
strcmp() is a little expensive, and useless here -- ointers make our lives easier.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1986 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd_io.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index aa5d5af65..ac5f66821 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -184,11 +184,11 @@ std::string ConfProcess(char* buffer, long linenumber, std::stringstream* errors
buffer[d] = ' ';
while ((buffer[0] == ' ') && (strlen(buffer)>0)) buffer++;
while ((buffer[strlen(buffer)-1] == ' ') && (strlen(buffer)>0)) buffer[strlen(buffer)-1] = '\0';
- // empty lines are syntactically valid
- if (!strcmp(buffer,""))
- return "";
- else if (buffer[0] == '#')
+
+ // empty lines are syntactically valid, as are comments
+ if (!(*buffer) || buffer[0] == '#')
return "";
+
for (unsigned int c = 0; c < strlen(buffer); c++)
{
// convert all spaces that are OUTSIDE quotes into hardspace (0xA0) as this will make them easier to