aboutsummaryrefslogtreecommitdiff
path: root/src/tool_metalink.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-10-31 21:49:38 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 21:51:19 +0100
commit95bd2b3e7f00b9ecbd4d5ea7d8bc3b59fcb038c0 (patch)
treea097d3b9398ca33a83fffe7b53fa018bd466e998 /src/tool_metalink.c
parent1071680946686f0a76a1b6fcbadd8ec81253282d (diff)
strcase: make the tool use curl_str[n]equal instead
As they are after all part of the public API. Saves space and reduces complexity. Remove the strcase defines from the curlx_ family. Suggested-by: Dan Fandrich Idea: https://curl.haxx.se/mail/lib-2016-10/0136.html
Diffstat (limited to 'src/tool_metalink.c')
-rw-r--r--src/tool_metalink.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tool_metalink.c b/src/tool_metalink.c
index 77f3ba513..985e7c323 100644
--- a/src/tool_metalink.c
+++ b/src/tool_metalink.c
@@ -747,7 +747,7 @@ static metalinkfile *new_metalinkfile(metalink_file_t *fileinfo)
++digest_alias) {
metalink_checksum_t **p;
for(p = fileinfo->checksums; *p; ++p) {
- if(strcasecompare(digest_alias->alias_name, (*p)->type) &&
+ if(curl_strequal(digest_alias->alias_name, (*p)->type) &&
check_hex_digest((*p)->hash, digest_alias->digest_def)) {
f->checksum =
new_metalink_checksum_from_hex_digest(digest_alias->digest_def,
@@ -777,10 +777,10 @@ static metalinkfile *new_metalinkfile(metalink_file_t *fileinfo)
metainfo file URL may be appeared in fileinfo->metaurls.
*/
if((*p)->type == NULL ||
- strcasecompare((*p)->type, "http") ||
- strcasecompare((*p)->type, "https") ||
- strcasecompare((*p)->type, "ftp") ||
- strcasecompare((*p)->type, "ftps")) {
+ curl_strequal((*p)->type, "http") ||
+ curl_strequal((*p)->type, "https") ||
+ curl_strequal((*p)->type, "ftp") ||
+ curl_strequal((*p)->type, "ftps")) {
res = new_metalink_resource((*p)->url);
tail->next = res;
tail = res;
@@ -906,7 +906,7 @@ static int check_content_type(const char *content_type, const char *media_type)
if(!*ptr) {
return 0;
}
- return strncasecompare(ptr, media_type, media_type_len) &&
+ return curl_strnequal(ptr, media_type, media_type_len) &&
(*(ptr+media_type_len) == '\0' || *(ptr+media_type_len) == ' ' ||
*(ptr+media_type_len) == '\t' || *(ptr+media_type_len) == ';');
}