store number of lines in int instead of size_t
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
diff --git a/include/got_object.h b/include/got_object.h
index c24e7e0..4381cdf 100644
--- a/include/got_object.h
+++ b/include/got_object.h
@@ -218,11 +218,10 @@ const struct got_error *got_object_blob_read_block(size_t *,
/*
* Read the entire content of a blob and write it to the specified file.
* Flush and rewind the file as well. Indicate the amount of bytes
- * written in the first size_t output argument, and the number of lines
- * in the file in the second size_t output argument (NULL can be passed
- * for either output argument).
+ * written in the size_t output argument, and the number of lines in
+ * the file in int argument (NULL can be passed for either output argument).
*/
-const struct got_error *got_object_blob_dump_to_file(size_t *, size_t *,
+const struct got_error *got_object_blob_dump_to_file(size_t *, int *,
FILE *, struct got_blob_object *);
/*
diff --git a/lib/blame.c b/lib/blame.c
index ea25dfb..e32dd4a 100644
--- a/lib/blame.c
+++ b/lib/blame.c
@@ -52,7 +52,7 @@ SLIST_HEAD(got_blame_diff_offsets_list, got_blame_diff_offsets);
struct got_blame {
FILE *f;
- size_t nlines;
+ int nlines;
struct got_blame_line *lines; /* one per line */
int ncommits;
struct got_blame_diff_offsets_list diff_offsets_list;
diff --git a/lib/object.c b/lib/object.c
index 0826de5..d8eaa06 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -662,7 +662,7 @@ got_object_blob_read_block(size_t *outlenp, struct got_blob_object *blob)
}
const struct got_error *
-got_object_blob_dump_to_file(size_t *total_len, size_t *nlines,
+got_object_blob_dump_to_file(size_t *total_len, int *nlines,
FILE *outfile, struct got_blob_object *blob)
{
const struct got_error *err = NULL;
diff --git a/tog/tog.c b/tog/tog.c
index 571b5ab..a450bfd 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -169,7 +169,7 @@ struct tog_blame {
FILE *f;
size_t filesize;
struct tog_blame_line *lines;
- size_t nlines;
+ int nlines;
pthread_t thread;
struct tog_blame_thread_args thread_args;
struct tog_blame_cb_args cb_args;