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:
Paul Eggert
2024-11-01 09:40:36 -07:00
parent 7b278044a7
commit c2ce0b7e13
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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 */