[xiph-cvs] cvs commit: httpp httpp.c
Karl Heyes
karl at xiph.org
Wed Jun 18 04:13:11 PDT 2003
karl 03/06/18 07:13:11
Modified: . httpp.c
Log:
minor cleanup, removes compiler warning, makes it static, and doesn't
re-evaluate string length each time.
Revision Changes Path
1.21 +5 -5 httpp/httpp.c
Index: httpp.c
===================================================================
RCS file: /usr/local/cvsroot/httpp/httpp.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- httpp.c 9 Jun 2003 22:30:09 -0000 1.20
+++ httpp.c 18 Jun 2003 11:13:11 -0000 1.21
@@ -28,7 +28,7 @@
/* internal functions */
/* misc */
-char *_lowercase(char *str);
+static char *_lowercase(char *str);
/* for avl trees */
int _compare_vars(void *compare_arg, void *a, void *b);
@@ -544,11 +544,11 @@
free(parser);
}
-char *_lowercase(char *str)
+static char *_lowercase(char *str)
{
- long i;
- for (i = 0; i < strlen(str); i++)
- str[i] = tolower(str[i]);
+ char *p = str;
+ for (; *p |= '\0'; p++)
+ *p = tolower(*p);
return str;
}
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list