char *ip2net = NULL;
long int pto = -1, pc = -1, pbc = -1, cre = -1;
struct cYAML *err_rc = NULL;
- int rc, opt, num_global_cpts = 0;
+ int rc, opt, cpt_rc = -1;
struct lnet_dlc_network_descr nw_descr;
struct cfs_expr_list *global_cpts = NULL;
struct lnet_ioctl_config_lnd_tunables tunables;
}
break;
case 's':
- num_global_cpts =
- cfs_expr_list_parse(optarg,
- strlen(optarg),
- 0, UINT_MAX, &global_cpts);
+ cpt_rc = cfs_expr_list_parse(optarg,
+ strlen(optarg), 0,
+ UINT_MAX, &global_cpts);
break;
case 'h':
print_help(net_cmds, "net", "add");
}
rc = lustre_lnet_config_ni(&nw_descr,
- (num_global_cpts > 0) ? global_cpts: NULL,
+ (cpt_rc == 0) ? global_cpts: NULL,
ip2net, (found) ? &tunables : NULL,
-1, &err_rc);
break;
}
- if (rc != LUSTRE_CFG_RC_NO_ERR)
- cYAML_print_tree2file(stderr, err_rc);
+ cYAML_print_tree2file(stderr, err_rc);
cYAML_free_tree(err_rc);