Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
cbf742ac
Commit
cbf742ac
authored
Jun 26, 2011
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use (s)size_t
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
parent
c4d0fa85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/git2/pkt.h
+1
-1
src/pkt.c
+3
-3
No files found.
include/git2/pkt.h
View file @
cbf742ac
...
...
@@ -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
in
t
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
);
src/pkt.c
View file @
cbf742ac
...
...
@@ -106,7 +106,7 @@ out:
return
error
;
}
static
unsigned
in
t
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
in
t
bufflen
)
int
git_pkt_parse_line
(
git_pkt
**
head
,
const
char
*
line
,
const
char
**
out
,
size_
t
bufflen
)
{
int
error
=
GIT_SUCCESS
;
unsigned
in
t
len
;
size_
t
len
;
/* Not even enough for the length */
if
(
bufflen
>
0
&&
bufflen
<
PKT_LEN_SIZE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment