diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-04 15:29:32 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-04-04 15:29:32 +0200 |
commit | 4836331924b5eb7f74e000d50c99bc12d513f8c7 (patch) | |
tree | 96c25b9daf69ba688350874e9b51bfc6758237fe /networking/wget.c | |
parent | c03602baa483ed07230c88075121e0f56a4c0428 (diff) | |
download | busybox-w32-4836331924b5eb7f74e000d50c99bc12d513f8c7.tar.gz busybox-w32-4836331924b5eb7f74e000d50c99bc12d513f8c7.tar.bz2 busybox-w32-4836331924b5eb7f74e000d50c99bc12d513f8c7.zip |
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.c | 6 |
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*/) | |||
282 | return NULL; | 282 | return NULL; |
283 | 283 | ||
284 | /* convert the header name to lower case */ | 284 | /* convert the header name to lower case */ |
285 | for (s = buf; isalnum(*s) || *s == '-' || *s == '.'; ++s) | 285 | for (s = buf; isalnum(*s) || *s == '-' || *s == '.'; ++s) { |
286 | *s = tolower(*s); | 286 | /* tolower for "A-Z", no-op for "0-9a-z-." */ |
287 | *s = (*s | 0x20); | ||
288 | } | ||
287 | 289 | ||
288 | /* verify we are at the end of the header name */ | 290 | /* verify we are at the end of the header name */ |
289 | if (*s != ':') | 291 | if (*s != ':') |