This patch makes no functional changes. The long_options struct
initializer in jt_nodemap_del_idmap() is updated to C99 syntax.
It is renamed to long_opts for consistency.
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.
Test-Parameters: trivial
Signed-off-by: Steve Guminski <stephenx.guminski@intel.com>
Change-Id: Ic97d308286ce03507bf3f928d9a2b23d6d39947f
Reviewed-on: https://review.whamcloud.com/27891
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
char *idtype = NULL;
int rc = 0;
char *idtype = NULL;
int rc = 0;
- static struct option long_options[] = {
- {
- .name = "name",
- .has_arg = required_argument,
- .flag = 0,
- .val = 'n',
- },
- {
- .name = "idmap",
- .has_arg = required_argument,
- .flag = 0,
- .val = 'm',
- },
- {
- .name = "idtype",
- .has_arg = required_argument,
- .flag = 0,
- .val = 'i',
- },
- {
- NULL
- }
- };
+ static struct option long_opts[] = {
+ { .val = 'i', .name = "idtype", .has_arg = required_argument },
+ { .val = 'm', .name = "idmap", .has_arg = required_argument },
+ { .val = 'n', .name = "name", .has_arg = required_argument },
+ { .name = NULL } };
while ((c = getopt_long(argc, argv, "n:m:i:",
while ((c = getopt_long(argc, argv, "n:m:i:",
- long_options, NULL)) != -1) {
+ long_opts, NULL)) != -1) {
switch (c) {
case 'n':
nodemap_name = optarg;
switch (c) {
case 'n':
nodemap_name = optarg;