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
a64bf21b
Commit
a64bf21b
authored
Jun 15, 2011
by
nulltoken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blob: Fix git_blob_create_fromfile()
parent
a51201cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/blob.c
+2
-2
src/fileops.c
+1
-1
No files found.
src/blob.c
View file @
a64bf21b
...
@@ -119,9 +119,9 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
...
@@ -119,9 +119,9 @@ int git_blob_create_fromfile(git_oid *oid, git_repository *repo, const char *pat
ssize_t
read_len
;
ssize_t
read_len
;
if
(
!
islnk
)
if
(
!
islnk
)
read_len
=
gitfo_read
(
fd
,
buffer
,
sizeof
(
buffer
));
read_len
=
gitfo_read
(
fd
,
buffer
,
(
size_t
)(
size
<
sizeof
(
buffer
)
?
size
:
sizeof
(
buffer
)
));
else
else
read_len
=
gitfo_readlink
(
full_path
,
buffer
,
sizeof
(
buffer
)
);
read_len
=
gitfo_readlink
(
full_path
,
buffer
,
(
size_t
)
size
);
if
(
read_len
<
0
)
{
if
(
read_len
<
0
)
{
if
(
!
islnk
)
if
(
!
islnk
)
...
...
src/fileops.c
View file @
a64bf21b
...
@@ -97,7 +97,7 @@ int gitfo_read(git_file fd, void *buf, size_t cnt)
...
@@ -97,7 +97,7 @@ int gitfo_read(git_file fd, void *buf, size_t cnt)
cnt
-=
r
;
cnt
-=
r
;
b
+=
r
;
b
+=
r
;
}
}
return
GIT_SUCCESS
;
return
(
int
)(
b
-
(
char
*
)
buf
)
;
}
}
int
gitfo_write
(
git_file
fd
,
void
*
buf
,
size_t
cnt
)
int
gitfo_write
(
git_file
fd
,
void
*
buf
,
size_t
cnt
)
...
...
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