diff options
Diffstat (limited to '')
-rw-r--r--source/shared.c8
1 file changed, 4 insertions, 4 deletions
diff --git a/source/shared.c b/source/shared.c
index 3191742..51c92d4 100644
--- a/source/shared.c
+++ b/source/shared.c
@@ -384,14 +384,14 @@ void cgit_diff_tree_cb(struct diff_queue_struct *q, struct diff_options *options
}
int cgit_diff_files(const struct object_id *old_oid, const struct object_id *new_oid,
- unsigned long *old_size, unsigned long *new_size, int *binary, int context, int ignorews,
+ size_t *old_size, size_t *new_size, int *binary, int context, int ignorews,
linediff_fn fn)
{
mmfile_t old_file, new_file;
xpparam_t diff_params;
xdemitconf_t emit_params;
xdemitcb_t emit_cb;
- unsigned long old_bytes = 0, new_bytes = 0;
+ size_t old_bytes = 0, new_bytes = 0;
// Read the object headers first so an oversized blob is never inflated
// into memory just to be diffed. Reporting it as binary suppresses
@@ -448,9 +448,9 @@ int cgit_diff_files(const struct object_id *old_oid, const struct object_id *new
return 0;
}
-int cgit_blob_too_large(unsigned long size)
+int cgit_blob_too_large(size_t size)
{
- return ctx.cfg.max_blob_size && size / 1024 > (unsigned long)ctx.cfg.max_blob_size;
+ return ctx.cfg.max_blob_size && size / 1024 > (size_t)ctx.cfg.max_blob_size;
}
void cgit_diff_limit_path(struct diff_options *opt, const char *prefix)