From cbf742ac4e7daccae10fd60d0651242c49663bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sun, 26 Jun 2011 19:40:02 +0200 Subject: [PATCH] Use (s)size_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Martín Nieto --- include/git2/pkt.h | 2 +- src/pkt.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/git2/pkt.h b/include/git2/pkt.h index 7a91ed490..bcd5c81d1 100644 --- a/include/git2/pkt.h +++ b/include/git2/pkt.h @@ -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_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); diff --git a/src/pkt.c b/src/pkt.c index a7365cc0f..403850b08 100644 --- a/src/pkt.c +++ b/src/pkt.c @@ -106,7 +106,7 @@ out: return error; } -static unsigned int parse_len(const char *line) +static ssize_t parse_len(const char *line) { char num[PKT_LEN_SIZE + 1]; int i, error; @@ -142,10 +142,10 @@ static unsigned int parse_len(const char *line) * 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; - unsigned int len; + size_t len; /* Not even enough for the length */ if (bufflen > 0 && bufflen < PKT_LEN_SIZE)