From ef95115f61b898d1f63a63e3a6d6427c5c3526d4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 Nov 2024 19:52:50 -0700 Subject: [PATCH] Prefer other types to int in sparse.c * src/sparse.c (oldgnu_get_sparse_info, star_get_sparse_info): Prefer char for char. --- src/sparse.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sparse.c b/src/sparse.c index 61f20c1f..d04798b9 100644 --- a/src/sparse.c +++ b/src/sparse.c @@ -781,7 +781,6 @@ static bool oldgnu_get_sparse_info (struct tar_sparse_file *file) { union block *h = current_header; - int ext_p; enum oldgnu_add_status rc; file->stat_info->sparse_map_avail = 0; @@ -792,7 +791,7 @@ oldgnu_get_sparse_info (struct tar_sparse_file *file) break; } - for (ext_p = h->oldgnu_header.isextended; + for (char ext_p = h->oldgnu_header.isextended; rc == add_ok && ext_p; ext_p = h->sparse_header.isextended) { h = find_next_block (); @@ -903,7 +902,7 @@ static bool star_get_sparse_info (struct tar_sparse_file *file) { union block *h = current_header; - int ext_p; + char ext_p; enum oldgnu_add_status rc = add_ok; file->stat_info->sparse_map_avail = 0; -- 2.47.2