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
356f11fe
Commit
356f11fe
authored
Sep 29, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
index: Silence type-punned warning
parent
780bea6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
src/index.c
+4
-1
No files found.
src/index.c
View file @
356f11fe
...
...
@@ -807,6 +807,7 @@ static int is_index_extended(git_index *index)
static
int
write_disk_entry
(
git_filebuf
*
file
,
git_index_entry
*
entry
)
{
void
*
mem
=
NULL
;
struct
entry_short
*
ondisk
;
size_t
path_len
,
disk_size
;
char
*
path
;
...
...
@@ -818,9 +819,11 @@ static int write_disk_entry(git_filebuf *file, git_index_entry *entry)
else
disk_size
=
short_entry_size
(
path_len
);
if
(
git_filebuf_reserve
(
file
,
(
void
**
)
&
ondisk
,
disk_size
)
<
GIT_SUCCESS
)
if
(
git_filebuf_reserve
(
file
,
&
mem
,
disk_size
)
<
GIT_SUCCESS
)
return
GIT_ENOMEM
;
ondisk
=
(
struct
entry_short
*
)
mem
;
memset
(
ondisk
,
0x0
,
disk_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