Commit 032ad5d9 authored by Karl Heyes's avatar Karl Heyes

minor cleanup, removes compiler warning, makes it static, and doesn't

re-evaluate string length each time.

svn path=/trunk/httpp/; revision=4961
parent a4d20515
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* internal functions */ /* internal functions */
/* misc */ /* misc */
char *_lowercase(char *str); static char *_lowercase(char *str);
/* for avl trees */ /* for avl trees */
int _compare_vars(void *compare_arg, void *a, void *b); int _compare_vars(void *compare_arg, void *a, void *b);
...@@ -544,11 +544,11 @@ void httpp_destroy(http_parser_t *parser) ...@@ -544,11 +544,11 @@ void httpp_destroy(http_parser_t *parser)
free(parser); free(parser);
} }
char *_lowercase(char *str) static char *_lowercase(char *str)
{ {
long i; char *p = str;
for (i = 0; i < strlen(str); i++) for (; *p |= '\0'; p++)
str[i] = tolower(str[i]); *p = tolower(*p);
return str; return str;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment