summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-05-22 11:48:28 +0200
committerEdward Thomson <ethomson@edwardthomson.com>2019-05-22 11:48:28 +0200
commit355b02a1f2243ea00cfe98b9e2e3488c0f2b4ab3 (patch)
treeacfecaee6ee3e4a3cfc45b4ff28da6a7556e6050
parent23c5699eb78724c4bdd8d2afcb7e49f32fbac6fb (diff)
downloadlibgit2-ethomson/config_section_validity.tar.gz
config: rename subsection header parser funcethomson/config_section_validity
The `parse_section_header_ext` name suggests that it as an extended function for parsing the section header. It is not. Rename it to `parse_subsection_header` to better reflect its true mission.
-rw-r--r--src/config_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config_parse.c b/src/config_parse.c
index 6e9b9a805..64d9a698b 100644
--- a/src/config_parse.c
+++ b/src/config_parse.c
@@ -66,7 +66,7 @@ static int strip_comments(char *line, int in_quotes)
}
-static int parse_section_header_ext(git_config_parser *reader, const char *line, size_t pos, const char *base_name, char **section_name)
+static int parse_subsection_header(git_config_parser *reader, const char *line, size_t pos, const char *base_name, char **section_name)
{
int c, rpos;
const char *first_quote, *last_quote;
@@ -191,7 +191,7 @@ static int parse_section_header(git_config_parser *reader, char **section_out)
do {
if (git__isspace(c)){
name[name_length] = '\0';
- result = parse_section_header_ext(reader, line, pos, name, section_out);
+ result = parse_subsection_header(reader, line, pos, name, section_out);
git__free(line);
git__free(name);
return result;