]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Prefer other types to int in sparse.c
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 02:52:50 +0000 (19:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:47:23 +0000 (23:47 -0700)
* src/sparse.c (oldgnu_get_sparse_info, star_get_sparse_info):
Prefer char for char.

src/sparse.c

index 61f20c1f32bb4ea49a430d96a22b8eff58ccf357..d04798b906d6c6a1ec319fe4e73f2e7376880df9 100644 (file)
@@ -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;