aboutsummaryrefslogtreecommitdiff
path: root/networking/wget.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-04-04 15:29:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-04 15:29:32 +0200
commit4836331924b5eb7f74e000d50c99bc12d513f8c7 (patch)
tree96c25b9daf69ba688350874e9b51bfc6758237fe /networking/wget.c
parentc03602baa483ed07230c88075121e0f56a4c0428 (diff)
downloadbusybox-4836331924b5eb7f74e000d50c99bc12d513f8c7.tar.gz
libbb: factor out hex2bin() for infiniband address parser
function old new delta hex2bin - 149 +149 in_ib 172 27 -145 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/wget.c')
-rw-r--r--networking/wget.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 5b73b933b..97f4a8f6e 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -282,8 +282,10 @@ static char *gethdr(char *buf, size_t bufsiz, FILE *fp /*, int *istrunc*/)
return NULL;
/* convert the header name to lower case */
- for (s = buf; isalnum(*s) || *s == '-' || *s == '.'; ++s)
- *s = tolower(*s);
+ for (s = buf; isalnum(*s) || *s == '-' || *s == '.'; ++s) {
+ /* tolower for "A-Z", no-op for "0-9a-z-." */
+ *s = (*s | 0x20);
+ }
/* verify we are at the end of the header name */
if (*s != ':')