Commit cbf742ac by Carlos Martín Nieto

Use (s)size_t

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent c4d0fa85
...@@ -56,5 +56,5 @@ struct git_pkt_ref { ...@@ -56,5 +56,5 @@ struct git_pkt_ref {
*/ */
int git_pkt_gen_proto(char **out, int *outlen, const char *cmd, const char *url); int git_pkt_gen_proto(char **out, int *outlen, const char *cmd, const char *url);
int git_pkt_send_request(int socket, const char *cmd, const char *url); int git_pkt_send_request(int socket, const char *cmd, const char *url);
int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, unsigned int len); int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, size_t len);
void git_pkt_free(git_pkt *pkt); void git_pkt_free(git_pkt *pkt);
...@@ -106,7 +106,7 @@ out: ...@@ -106,7 +106,7 @@ out:
return error; return error;
} }
static unsigned int parse_len(const char *line) static ssize_t parse_len(const char *line)
{ {
char num[PKT_LEN_SIZE + 1]; char num[PKT_LEN_SIZE + 1];
int i, error; int i, error;
...@@ -142,10 +142,10 @@ static unsigned int parse_len(const char *line) ...@@ -142,10 +142,10 @@ static unsigned int parse_len(const char *line)
* in ASCII hexadecimal (including itself) * in ASCII hexadecimal (including itself)
*/ */
int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, unsigned int bufflen) int git_pkt_parse_line(git_pkt **head, const char *line, const char **out, size_t bufflen)
{ {
int error = GIT_SUCCESS; int error = GIT_SUCCESS;
unsigned int len; size_t len;
/* Not even enough for the length */ /* Not even enough for the length */
if (bufflen > 0 && bufflen < PKT_LEN_SIZE) if (bufflen > 0 && bufflen < PKT_LEN_SIZE)
......
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