summaryrefslogtreecommitdiff
path: root/src/config_file.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-05-29 16:56:38 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-05-29 18:16:46 -0400
commit75a4636f502908ddd406a69a4b065e29b79276da (patch)
tree8e2a514a518e4efd4746c31e629a8cf7120afcd7 /src/config_file.c
parent006548da91bfe05375ae0e786c6c13e9bad85a40 (diff)
downloadlibgit2-75a4636f502908ddd406a69a4b065e29b79276da.tar.gz
git__tolower: a tolower() that isn't dumb
Some brain damaged tolower() implementations appear to want to take the locale into account, and this may require taking some insanely aggressive lock on the locale and slowing down what should be the most trivial of trivial calls for people who just want to downcase ASCII.
Diffstat (limited to 'src/config_file.c')
-rw-r--r--src/config_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config_file.c b/src/config_file.c
index d6a62b85c..52a5376bd 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -156,7 +156,7 @@ int git_config_file_normalize_section(char *start, char *end)
if (end && scan >= end)
break;
if (isalnum(*scan))
- *scan = (char)tolower(*scan);
+ *scan = (char)git__tolower(*scan);
else if (*scan != '-' || scan == start)
return GIT_EINVALIDSPEC;
}
@@ -1083,7 +1083,7 @@ static int parse_section_header(struct reader *reader, char **section_out)
goto fail_parse;
}
- name[name_length++] = (char) tolower(c);
+ name[name_length++] = (char)git__tolower(c);
} while ((c = line[pos++]) != ']');