Details
-
Task
-
Resolution: Fixed
-
Minor
-
None
-
17372
Description
In the libcfs and lnet code there are many places where positional struct initializers are used instead of named C99 initializers:
static struct netstrfns libcfs_netstrfns[] = { {/* .nf_type */ LOLND, /* .nf_name */ "lo", /* .nf_modname */ "klolnd", /* .nf_addr2str */ libcfs_decnum_addr2str, /* .nf_str2addr */ libcfs_lo_str2addr, /* .nf_parse_addr*/ libcfs_num_parse, /* .nf_print_addrlist*/ libcfs_num_addr_range_print, /* .nf_match_addr*/ libcfs_num_match, /* .nf_is_contiguous */ cfs_num_is_contiguous, /* .nf_min_max */ cfs_num_min_max},
instead of
static struct netstrfns libcfs_netstrfns[] = { { .nf_type = LOLND, .nf_name = "lo", .nf_modname = "klolnd", .nf_addr2str = libcfs_decnum_addr2str, .nf_str2addr = libcfs_lo_str2addr, .nf_parse_addr = libcfs_num_parse, .nf_print_addrlist = libcfs_num_addr_range_print, .nf_match_addr = libcfs_num_match, .nf_is_contiguous = cfs_num_is_contiguous, .nf_min_max = cfs_num_min_max},
This was done because WinNT didn't have C99 initializer support, but we don't care about that anymore.
All of the positional struct initializers in libcfs, lnet, and lustre should be changed to named initializers, probably in several independent patches for different subdirectories.