mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-04-26 11:30:39 +00:00
Prefer other types to int in tar.c
Use types that are more specific than ‘int’, if that is easy. * src/tar.c (after_date_option, xattrs_option, check_links_option) (confirm, confirm_file_EOF, set_xattr_option, optloc_eq) (get_date_or_file): Prefer bool to int. (tar_list_quoting_styles, tar_set_quoting_style, parse_opt): Prefer idx_t to int. (optloc_lookup, option_set_in_cl): Prefer enum option_class to int. (decode_signal): Avoid some pointer reallocation. (sort_mode_flag, hole_detection_types, set_old_files_option) (is_subcommand_class): Prefer enum to int. (parse_opt) [DEVICE_PREFIX]: Remove unused var. Simplify creation of device name. (find_argp_option_key, find_argp_option): Prefer char to int. (enum subcommand_class): Now named. (subcommand_class): Now char, not int. (decode_options): Check for unlikely int overflow.
This commit is contained in:
@@ -936,7 +936,7 @@ start_header (struct tar_stat_info *st)
|
||||
}
|
||||
if ((selinux_context_option > 0) && st->cntx_name)
|
||||
xheader_store ("RHT.security.selinux", st, NULL);
|
||||
if (xattrs_option > 0)
|
||||
if (xattrs_option)
|
||||
for (idx_t i = 0; i < st->xattr_map.xm_size; i++)
|
||||
xheader_store (st->xattr_map.xm_map[i].xkey, st, &i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user