Prefer idx_t to size_t in tar.h
* src/tar.h (struct xheader, struct tar_stat_info): Prefer idx_t to size_t. All uses changed.
This commit is contained in:
@@ -200,7 +200,7 @@ sparse_add_map (struct tar_stat_info *st, struct sp_array const *sp)
|
||||
idx_t avail = st->sparse_map_avail;
|
||||
if (avail == st->sparse_map_size)
|
||||
st->sparse_map = sparse_map =
|
||||
x2nrealloc (sparse_map, &st->sparse_map_size, sizeof *sparse_map);
|
||||
xpalloc (sparse_map, &st->sparse_map_size, 1, -1, sizeof *sparse_map);
|
||||
sparse_map[avail] = *sp;
|
||||
st->sparse_map_avail = avail + 1;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ struct sp_array
|
||||
struct xheader
|
||||
{
|
||||
struct obstack *stk;
|
||||
size_t size;
|
||||
idx_t size;
|
||||
char *buffer;
|
||||
uintmax_t string_length;
|
||||
};
|
||||
@@ -343,10 +343,10 @@ struct tar_stat_info
|
||||
/* For sparse files: */
|
||||
intmax_t sparse_major;
|
||||
intmax_t sparse_minor;
|
||||
size_t sparse_map_avail; /* Index to the first unused element in
|
||||
idx_t sparse_map_avail; /* Index to the first unused element in
|
||||
sparse_map array. Zero if the file is
|
||||
not sparse */
|
||||
size_t sparse_map_size; /* Size of the sparse map */
|
||||
idx_t sparse_map_size; /* Size of the sparse map */
|
||||
struct sp_array *sparse_map;
|
||||
|
||||
off_t real_size; /* The real size of sparse file */
|
||||
|
||||
Reference in New Issue
Block a user