mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-19 06:01:54 +00:00
pack: __object_header
always returns unsigned values
This commit is contained in:
parent
3343b5ffd3
commit
51a3dfb595
@ -632,8 +632,7 @@ static int inject_object(git_indexer_stream *idx, git_oid *id)
|
|||||||
git_buf buf = GIT_BUF_INIT;
|
git_buf buf = GIT_BUF_INIT;
|
||||||
git_off_t entry_start;
|
git_off_t entry_start;
|
||||||
const void *data;
|
const void *data;
|
||||||
size_t len;
|
size_t len, hdr_len;
|
||||||
int hdr_len;
|
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
entry = git__calloc(1, sizeof(*entry));
|
entry = git__calloc(1, sizeof(*entry));
|
||||||
|
@ -372,7 +372,7 @@ static unsigned char *pack_window_open(
|
|||||||
* - each byte afterwards: low seven bits are size continuation,
|
* - each byte afterwards: low seven bits are size continuation,
|
||||||
* with the high bit being "size continues"
|
* with the high bit being "size continues"
|
||||||
*/
|
*/
|
||||||
int git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type)
|
size_t git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type)
|
||||||
{
|
{
|
||||||
unsigned char *hdr_base;
|
unsigned char *hdr_base;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
@ -392,7 +392,7 @@ int git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type)
|
|||||||
}
|
}
|
||||||
*hdr++ = c;
|
*hdr++ = c;
|
||||||
|
|
||||||
return (int)(hdr - hdr_base);
|
return (hdr - hdr_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ typedef struct git_packfile_stream {
|
|||||||
git_mwindow *mw;
|
git_mwindow *mw;
|
||||||
} git_packfile_stream;
|
} git_packfile_stream;
|
||||||
|
|
||||||
int git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type);
|
size_t git_packfile__object_header(unsigned char *hdr, size_t size, git_otype type);
|
||||||
|
|
||||||
int git_packfile_unpack_header(
|
int git_packfile_unpack_header(
|
||||||
size_t *size_p,
|
size_t *size_p,
|
||||||
|
Loading…
Reference in New Issue
Block a user