Commit 356f11fe by Vicent Marti

index: Silence type-punned warning

parent 780bea6e
......@@ -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);
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment