Fewer uses of size_t in buffer.c

* src/buffer.c (flush_write_ptr, flush_bufmap, bufmap_locate):
(struct zip_magic, available_space_after, _flush_write)
(short_read, flush_archive, try_new_volume)
(gnu_add_multi_volume_header, simple_flush_read)
(simple_flush_write, _gnu_flush_read, _gnu_flush_write)
(gnu_flush_write): Prefer idx_t to size_t when either will do, as
signed types are typically safer.  For a tiny value in memory,
just use ‘char’.
This commit is contained in:
Paul Eggert
2024-10-31 19:53:25 -07:00
parent 647cafff96
commit 78dd7bf0bc
2 changed files with 48 additions and 73 deletions

View File

@@ -445,7 +445,7 @@ extern off_t records_read;
char *drop_volume_label_suffix (const char *label)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
size_t available_space_after (union block *pointer);
idx_t available_space_after (union block *pointer);
off_t current_block_ordinal (void);
void close_archive (void);
void closeout_volume_number (void);