From: Daniel Stenberg Date: Mon, 31 Oct 2016 08:37:30 +0000 (+0100) Subject: strcase: s/strequal/strcasecompare X-Git-Tag: curl-7_51_0~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44c53cc38bea66b7612a82fa4c9b68884b9167fa;p=thirdparty%2Fcurl.git strcase: s/strequal/strcasecompare some more follow-ups to 811a693b80 --- diff --git a/lib/ldap.c b/lib/ldap.c index 6a8cdf8e72..553c161a08 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -708,16 +708,16 @@ static void _ldap_trace (const char *fmt, ...) */ static int str2scope (const char *p) { - if(strequal(p, "one")) - return LDAP_SCOPE_ONELEVEL; - if(strequal(p, "onetree")) - return LDAP_SCOPE_ONELEVEL; - if(strequal(p, "base")) - return LDAP_SCOPE_BASE; - if(strequal(p, "sub")) - return LDAP_SCOPE_SUBTREE; - if(strequal(p, "subtree")) - return LDAP_SCOPE_SUBTREE; + if(strcasecompare(p, "one")) + return LDAP_SCOPE_ONELEVEL; + if(strcasecompare(p, "onetree")) + return LDAP_SCOPE_ONELEVEL; + if(strcasecompare(p, "base")) + return LDAP_SCOPE_BASE; + if(strcasecompare(p, "sub")) + return LDAP_SCOPE_SUBTREE; + if(strcasecompare(p, "subtree")) + return LDAP_SCOPE_SUBTREE; return (-1); } @@ -776,9 +776,9 @@ static int _ldap_url_parse2(const struct connectdata *conn, LDAPURLDesc *ludp) size_t i; if(!conn->data || - !conn->data->state.path || - conn->data->state.path[0] != '/' || - !checkprefix("LDAP", conn->data->change.url)) + !conn->data->state.path || + conn->data->state.path[0] != '/' || + !checkprefix("LDAP", conn->data->change.url)) return LDAP_INVALID_SYNTAX; ludp->lud_scope = LDAP_SCOPE_BASE; diff --git a/lib/x509asn1.c b/lib/x509asn1.c index 0559cb6c4e..74a511b2db 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -27,7 +27,7 @@ #include #include "urldata.h" -#include "strequal.h" +#include "strcase.h" #include "hostcheck.h" #include "vtls/vtls.h" #include "sendf.h" diff --git a/tests/data/test1301 b/tests/data/test1301 index 4b6fac8b8a..8506c0005e 100644 --- a/tests/data/test1301 +++ b/tests/data/test1301 @@ -2,7 +2,7 @@ unittest -curl_strequal +curl_strcasecompare @@ -16,7 +16,7 @@ none unittest -curl_strequal unit tests +curl_strcasecompare unit tests unit1301