Skip to content

Commit c9214cc

Browse files
committed
reachable: Change list name from *_if to *_ifs
The parameter names were misleading due to implying a single interface instead of a list. This will provide more clarity in distinguishing the list of interfaces from each individual interface. Signed-off-by: William Zhang <[email protected]>
1 parent d0dc621 commit c9214cc

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

opal/mca/reachable/netlink/reachable_netlink_module.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ static int netlink_fini(void)
5959
* Higher weightings are given to connections on the same
6060
* network.
6161
*/
62-
static opal_reachable_t* netlink_reachable(opal_list_t *local_if,
63-
opal_list_t *remote_if)
62+
static opal_reachable_t* netlink_reachable(opal_list_t *local_ifs,
63+
opal_list_t *remote_ifs)
6464
{
6565
opal_reachable_t *reachable_results = NULL;
6666
int i, j;
6767
opal_if_t *local_iter, *remote_iter;
6868

69-
reachable_results = opal_reachable_allocate(local_if->opal_list_length,
70-
remote_if->opal_list_length);
69+
reachable_results = opal_reachable_allocate(local_ifs->opal_list_length,
70+
remote_ifs->opal_list_length);
7171
if (NULL == reachable_results) {
7272
return NULL;
7373
}
7474

7575
i = 0;
76-
OPAL_LIST_FOREACH(local_iter, local_if, opal_if_t) {
76+
OPAL_LIST_FOREACH(local_iter, local_ifs, opal_if_t) {
7777
j = 0;
78-
OPAL_LIST_FOREACH(remote_iter, remote_if, opal_if_t) {
78+
OPAL_LIST_FOREACH(remote_iter, remote_ifs, opal_if_t) {
7979
reachable_results->weights[i][j] = get_weights(local_iter, remote_iter);
8080
j++;
8181
}

opal/mca/reachable/reachable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ typedef int (*opal_reachable_base_module_fini_fn_t)(void);
6868
* success, NULL on failure.
6969
*/
7070
typedef opal_reachable_t*
71-
(*opal_reachable_base_module_reachable_fn_t)(opal_list_t *local_if,
72-
opal_list_t *remote_if);
71+
(*opal_reachable_base_module_reachable_fn_t)(opal_list_t *local_ifs,
72+
opal_list_t *remote_ifs);
7373

7474

7575
/*

opal/mca/reachable/weighted/reachable_weighted.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
static int weighted_init(void);
3737
static int weighted_fini(void);
38-
static opal_reachable_t* weighted_reachable(opal_list_t *local_if,
39-
opal_list_t *remote_if);
38+
static opal_reachable_t* weighted_reachable(opal_list_t *local_ifs,
39+
opal_list_t *remote_ifs);
4040

4141
static int get_weights(opal_if_t *local_if, opal_if_t *remote_if);
4242
static int calculate_weight(int bandwidth_local, int bandwidth_remote,
@@ -83,23 +83,23 @@ static int weighted_fini(void)
8383
}
8484

8585

86-
static opal_reachable_t* weighted_reachable(opal_list_t *local_if,
87-
opal_list_t *remote_if)
86+
static opal_reachable_t* weighted_reachable(opal_list_t *local_ifs,
87+
opal_list_t *remote_ifs)
8888
{
8989
opal_reachable_t *reachable_results = NULL;
9090
int i, j;
9191
opal_if_t *local_iter, *remote_iter;
9292

93-
reachable_results = opal_reachable_allocate(opal_list_get_size(local_if),
94-
opal_list_get_size(remote_if));
93+
reachable_results = opal_reachable_allocate(opal_list_get_size(local_ifs),
94+
opal_list_get_size(remote_ifs));
9595
if (NULL == reachable_results) {
9696
return NULL;
9797
}
9898

9999
i = 0;
100-
OPAL_LIST_FOREACH(local_iter, local_if, opal_if_t) {
100+
OPAL_LIST_FOREACH(local_iter, local_ifs, opal_if_t) {
101101
j = 0;
102-
OPAL_LIST_FOREACH(remote_iter, remote_if, opal_if_t) {
102+
OPAL_LIST_FOREACH(remote_iter, remote_ifs, opal_if_t) {
103103
reachable_results->weights[i][j] = get_weights(local_iter, remote_iter);
104104
j++;
105105
}

0 commit comments

Comments
 (0)