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
da9abdd6
Commit
da9abdd6
authored
Feb 29, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a win32 warning message
parent
854eccbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/fileops.c
+5
-2
No files found.
src/fileops.c
View file @
da9abdd6
...
...
@@ -180,8 +180,11 @@ int git_futils_mmap_ro(git_map *out, git_file fd, git_off_t begin, size_t len)
int
git_futils_mmap_ro_file
(
git_map
*
out
,
const
char
*
path
)
{
git_file
fd
=
p_open
(
path
,
O_RDONLY
/* | O_NOATIME */
);
size_t
len
=
git_futils_filesize
(
fd
);
int
result
=
git_futils_mmap_ro
(
out
,
fd
,
0
,
len
);
git_off_t
len
=
git_futils_filesize
(
fd
);
int
result
;
if
(
!
git__is_sizet
(
len
))
return
git__throw
(
GIT_ERROR
,
"File `%s` too large to mmap"
,
path
);
result
=
git_futils_mmap_ro
(
out
,
fd
,
0
,
(
size_t
)
len
);
p_close
(
fd
);
return
result
;
}
...
...
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