mirror of
https://github.com/git-for-windows/git.git
synced 2026-06-27 22:28:38 -05:00
delta: widen create_delta_index() parameter to size_t
The sole caller (try_delta() in builtin/pack-objects.c) passes an unsigned long, which promotes safely, so no caller fixups are needed. Splitting it out keeps the diff_delta() / create_delta() widening, which does ripple to several callers, in its own commit. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Git for Windows Build Agent
parent
3e560af360
commit
37ecde388c
@@ -14,7 +14,7 @@ struct delta_index;
|
||||
* using free_delta_index().
|
||||
*/
|
||||
struct delta_index *
|
||||
create_delta_index(const void *buf, unsigned long bufsize);
|
||||
create_delta_index(const void *buf, size_t bufsize);
|
||||
|
||||
/*
|
||||
* free_delta_index: free the index created by create_delta_index()
|
||||
|
||||
@@ -132,7 +132,7 @@ struct delta_index {
|
||||
struct index_entry *hash[FLEX_ARRAY];
|
||||
};
|
||||
|
||||
struct delta_index * create_delta_index(const void *buf, unsigned long bufsize)
|
||||
struct delta_index * create_delta_index(const void *buf, size_t bufsize)
|
||||
{
|
||||
unsigned int i, hsize, hmask, entries, prev_val, *hash_count;
|
||||
const unsigned char *data, *buffer = buf;
|
||||
|
||||
Reference in New Issue
Block a user