Fix some uses of int in list.c

* src/list.c (decode_xform): Last arg is now int, not a void *
pointer to that int.  All uses changed.
(enforce_one_top_level): Don’t assume string length fits in int.
(transform_stat_info): Prefer char to int for typeflag.
All uses changed.
(decode_header): Prefer bool for booleans.  All uses changed.
(ugswidth): Now idx_t, not int, since in theory it could
exceed INT_MAX.  All uses changed.
(simple_print_header, print_for_mkdir): Don’t assume printf length
fits in int, and similarly for length of user or group name.
* src/transform.c (transform_name_fp): Last arg is now int, not void *.
All uses changed.
This commit is contained in:
Paul Eggert
2024-11-01 23:47:23 -07:00
parent 7eb4dbaff1
commit 91ad4ea343
5 changed files with 66 additions and 80 deletions
+1 -1
View File
@@ -607,7 +607,7 @@ verify_volume (void)
continue;
}
decode_header (current_header, &current_stat_info, &current_format, 1);
decode_header (current_header, &current_stat_info, &current_format, true);
diff_archive ();
tar_stat_destroy (&current_stat_info);
}