Whamcloud - gitweb
LU-6210 lnet: Change positional struct initializers to C99 93/23493/7
authorSteve Guminski <stephenx.guminski@intel.com>
Thu, 27 Oct 2016 13:06:06 +0000 (09:06 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 31 Jan 2017 04:10:12 +0000 (04:10 +0000)
commit587a25e227024c89eb0802d1b311b5521fd5793c
tree9862ab17afb14a4613cffef0f65dc40a479c664a
parented336c765b50a37857daeb6fb7b2d523315399ca
LU-6210 lnet: Change positional struct initializers to C99

This patch makes no functional changes.  Struct initializers in the
lnet directory that use C89 or GCC-only syntax are updated to C99
syntax.  Whitespace is corrected to match coding style guidelines.

C89 positional initializers require values to be placed in the
correct order. This will cause errors if the fields of the struct
definition are reordered or fields are added or removed. C99 named
initializers avoid this problem, and also automatically clear any
values that are not explicitly set.

The following struct initializers have been updated:

lnet/include/lnet/lib-lnet.h:
struct libcfs_ioctl_handler ident
struct kvec diov (2 occurrences)
struct kvec siov (2 occurrences)
lnet/klnds/gnilnd/gnilnd_stack.c:
static struct rcadata rd[RCA_EVENTS]
lnet/utils/lnetconfig/liblnetconfig.c:
static struct lookup_cmd_hdlr_tbl lookup_config_tbl[]
static struct lookup_cmd_hdlr_tbl lookup_del_tbl[]
static struct lookup_cmd_hdlr_tbl lookup_show_tbl[]
lnet/utils/lnetctl.c:
const struct option long_options[] (10 occurrences)
lnet/utils/lst.c:
static struct option session_opts[]
static struct option ping_opts[]
static struct option update_group_opts[]
static struct option list_group_opts[]
static struct option stat_opts[]
static struct option  show_error_opts[]
struct option start_batch_opts[]
struct option stop_batch_opts[]
struct option list_batch_opts[]
struct option query_batch_opts[]
struct option add_test_opts[]
struct lst_sid LST_INVALID_SID
lnetutils/portals.c:
struct option opts[] (2 occurrences)
lnet/lnet/api-ni.c:
lnet_process_id_t id
lnet/lnet/lo.c:
lnd_t the_lolnd
lnet/selftest/framework.c:
struct lst_sid LST_INVALID_SID
lnet/utils/debug.c:
struct mod_paths

Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: I73cb72de2f084f572a3cf6b3ba5cd34805f39c5d
Reviewed-on: https://review.whamcloud.com/23493
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/include/lnet/lib-lnet.h
lnet/klnds/gnilnd/gnilnd_stack.c
lnet/lnet/api-ni.c
lnet/lnet/lo.c
lnet/selftest/framework.c
lnet/utils/debug.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetctl.c
lnet/utils/lst.c
lnet/utils/portals.c