Skip to content

Commit 7afe788

Browse files
committed
smart transport: use size_t for sizes
1 parent db7f1d9 commit 7afe788

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/transports/smart.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static int git_smart__set_callbacks(
7373
return 0;
7474
}
7575

76-
static int http_header_name_length(const char *http_header)
76+
static size_t http_header_name_length(const char *http_header)
7777
{
7878
const char *colon = strchr(http_header, ':');
7979
if (!colon)
@@ -84,7 +84,7 @@ static int http_header_name_length(const char *http_header)
8484
static bool is_malformed_http_header(const char *http_header)
8585
{
8686
const char *c;
87-
int name_len;
87+
size_t name_len;
8888

8989
/* Disallow \r and \n */
9090
c = strchr(http_header, '\r');
@@ -114,7 +114,7 @@ static char *forbidden_custom_headers[] = {
114114
static bool is_forbidden_custom_header(const char *custom_header)
115115
{
116116
unsigned long i;
117-
int name_len = http_header_name_length(custom_header);
117+
size_t name_len = http_header_name_length(custom_header);
118118

119119
/* Disallow headers that we set */
120120
for (i = 0; i < ARRAY_SIZE(forbidden_custom_headers); i++)

0 commit comments

Comments
 (0)