Update of /cvsroot/linux-decnet/dnprogs/libdap
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv9448/libdap
Modified Files:
connection.cc
Log Message:
don't use strlen() in for(), check for null byte directly, should speed up a lot
Index: connection.cc
===================================================================
RCS file: /cvsroot/linux-decnet/dnprogs/libdap/connection.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** connection.cc 4 Oct 2008 11:15:32 -0000 1.13
--- connection.cc 12 Nov 2008 23:47:43 -0000 1.14
***************
*** 909,918 ****
void dap_connection::makelower(char *s)
{
! for (unsigned int i=0; i<strlen(s); i++) s[i] = tolower(s[i]);
}
void dap_connection::makeupper(char *s)
{
! for (unsigned int i=0; i<strlen(s); i++) s[i] = toupper(s[i]);
}
--- 909,918 ----
void dap_connection::makelower(char *s)
{
! for (unsigned int i=0; s[i]; i++) s[i] = tolower(s[i]);
}
void dap_connection::makeupper(char *s)
{
! for (unsigned int i=0; s[i]; i++) s[i] = toupper(s[i]);
}
|