summaryrefslogtreecommitdiff
path: root/Utilities/cmcurl/lib/curl_fnmatch.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-11 10:55:44 -0400
committerBrad King <brad.king@kitware.com>2017-05-11 11:27:21 -0400
commit299975908ada992800791fac7f3739050e0ae2a9 (patch)
tree38cd8fb04ce84196dfa04d514eb92649900a1bc5 /Utilities/cmcurl/lib/curl_fnmatch.c
parent5af9c8e2451afd8e63d6b05e69cd141af543a164 (diff)
parentfd7d521c9d70655618db8232d45e5aaf81700f91 (diff)
downloadcmake-299975908ada992800791fac7f3739050e0ae2a9.tar.gz
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2017-04-19 (d957e218) Resolve conflicts in `CMakeLists.txt` in favor of the upstream version. We will re-apply our logic as needed in following commits.
Diffstat (limited to 'Utilities/cmcurl/lib/curl_fnmatch.c')
-rw-r--r--Utilities/cmcurl/lib/curl_fnmatch.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Utilities/cmcurl/lib/curl_fnmatch.c b/Utilities/cmcurl/lib/curl_fnmatch.c
index e8108bb10e..46d3ada1e9 100644
--- a/Utilities/cmcurl/lib/curl_fnmatch.c
+++ b/Utilities/cmcurl/lib/curl_fnmatch.c
@@ -145,8 +145,7 @@ static int setcharset(unsigned char **p, unsigned char *charset)
else if(c == ']') {
if(something_found)
return SETCHARSET_OK;
- else
- something_found = TRUE;
+ something_found = TRUE;
state = CURLFNM_SCHS_RIGHTBR;
charset[c] = 1;
(*p)++;
@@ -244,7 +243,7 @@ static int setcharset(unsigned char **p, unsigned char *charset)
if(c == ']') {
return SETCHARSET_OK;
}
- else if(c == '\\') {
+ if(c == '\\') {
c = *(++(*p));
if(ISPRINT(c)) {
charset[c] = 1;
@@ -345,8 +344,7 @@ static int loop(const unsigned char *pattern, const unsigned char *string)
else if(*p == '\0') {
if(*s == '\0')
return CURL_FNMATCH_MATCH;
- else
- return CURL_FNMATCH_NOMATCH;
+ return CURL_FNMATCH_NOMATCH;
}
else if(*p == '\\') {
state = CURLFNM_LOOP_BACKSLASH;