]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd_io.cpp
EXPERIMENTAL new socket engine code
[user/henk/code/inspircd.git] / src / inspircd_io.cpp
index aa5d5af65cb35137ae2b18599aa09ca7f9ab2d1f..4a83abc223672b28549e9f874992fef0b53fa31a 100644 (file)
@@ -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
@@ -735,4 +735,3 @@ int OpenTCPSocket (void)
                return (sockfd);
        }
 }
-