Author: gschneider
Date: Tue Aug 25 02:13:15 2009
New Revision: 42931

URL: http://svn.reactos.org/svn/reactos?rev=42931&view=rev
Log:
tftpd: add parenthesis around AND statements embedded in OR statements, use 
const char* for string constants (gcc 4.4 warnings)

Modified:
    trunk/reactos/base/services/tftpd/tftpd.cpp
    trunk/reactos/base/services/tftpd/tftpd.h

Modified: trunk/reactos/base/services/tftpd/tftpd.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tftpd/tftpd.cpp?rev=42931&r1=42930&r2=42931&view=diff
==============================================================================
--- trunk/reactos/base/services/tftpd/tftpd.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/services/tftpd/tftpd.cpp [iso-8859-1] Tue Aug 25 
02:13:15 2009
@@ -1568,7 +1568,7 @@
     //printf("%s %s\n", name, value);
 }
 
-bool getSection(char *sectionName, char *buffer, BYTE serial, char *fileName)
+bool getSection(const char *sectionName, char *buffer, BYTE serial, char 
*fileName)
 {
     //printf("%s=%s\n",fileName,sectionName);
     char section[128];
@@ -1598,7 +1598,7 @@
                         if (strstr(buff, "[") == buff)
                             break;
 
-                        if ((*buff) >= '0' && (*buff) <= '9' || (*buff) >= 'A' 
&& (*buff) <= 'Z' || (*buff) >= 'a' && (*buff) <= 'z' || ((*buff) && 
strchr("/\\?*", (*buff))))
+                        if (((*buff) >= '0' && (*buff) <= '9') || ((*buff) >= 
'A' && (*buff) <= 'Z') || ((*buff) >= 'a' && (*buff) <= 'z') || (((*buff) && 
strchr("/\\?*", (*buff)))))
                         {
                             buffer += sprintf(buffer, "%s", buff);
                             buffer++;

Modified: trunk/reactos/base/services/tftpd/tftpd.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/tftpd/tftpd.h?rev=42931&r1=42930&r2=42931&view=diff
==============================================================================
--- trunk/reactos/base/services/tftpd/tftpd.h [iso-8859-1] (original)
+++ trunk/reactos/base/services/tftpd/tftpd.h [iso-8859-1] Tue Aug 25 02:13:15 
2009
@@ -151,7 +151,7 @@
 char* myGetToken(char*, BYTE);
 void init();
 bool cleanReq(request*);
-bool getSection(char*, char*, BYTE, char*);
+bool getSection(const char*, char*, BYTE, char*);
 bool isIP(char*s);
 char* myLower(char*);
 char* myUpper(char*);


Reply via email to