Commit 66d90e70 by Matt Burke

More specific names

parent 8c876fa9
...@@ -66,7 +66,7 @@ static int git_smart__set_callbacks( ...@@ -66,7 +66,7 @@ static int git_smart__set_callbacks(
return 0; return 0;
} }
bool is_valid(const char *custom_header) bool is_valid_custom_header(const char *custom_header)
{ {
const char *c; const char *c;
int name_len; int name_len;
...@@ -99,7 +99,7 @@ bool is_valid(const char *custom_header) ...@@ -99,7 +99,7 @@ bool is_valid(const char *custom_header)
git__strncmp("Content-Length", custom_header, name_len) == 0; git__strncmp("Content-Length", custom_header, name_len) == 0;
} }
const char *find_invalid_header(const git_strarray *custom_headers) const char *find_invalid_custom_header(const git_strarray *custom_headers)
{ {
size_t i; size_t i;
...@@ -107,7 +107,7 @@ const char *find_invalid_header(const git_strarray *custom_headers) ...@@ -107,7 +107,7 @@ const char *find_invalid_header(const git_strarray *custom_headers)
return NULL; return NULL;
for (i = 0; i < custom_headers->count; i++) for (i = 0; i < custom_headers->count; i++)
if (!is_valid(custom_headers->strings[i])) if (!is_valid_custom_header(custom_headers->strings[i]))
return custom_headers->strings[i]; return custom_headers->strings[i];
return NULL; return NULL;
...@@ -118,7 +118,7 @@ static int git_smart__set_custom_headers( ...@@ -118,7 +118,7 @@ static int git_smart__set_custom_headers(
const git_strarray *custom_headers) const git_strarray *custom_headers)
{ {
transport_smart *t = (transport_smart *)transport; transport_smart *t = (transport_smart *)transport;
const char *invalid_header = find_invalid_header(custom_headers); const char *invalid_header = find_invalid_custom_header(custom_headers);
if (invalid_header != NULL) { if (invalid_header != NULL) {
giterr_set(GITERR_INVALID, "Illegal HTTP header '%s'", invalid_header); giterr_set(GITERR_INVALID, "Illegal HTTP header '%s'", invalid_header);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment