提交 8af4638a 编写于 作者: A Allan Stephens 提交者: Paul Gortmaker

tipc: Eliminate checks for empty zone list during name translation

Gets rid of a pair of checks to see if a name sequence entry in
TIPC's name table has an empty zone list. These checks are pointless
since the zone list can never be empty (i.e. as soon as the list
becomes empty the associated name sequence entry is deleted).
Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
上级 f6f0a4d2
......@@ -574,14 +574,13 @@ u32 tipc_nametbl_translate(u32 type, u32 instance, u32 *destnode)
cluster_list);
list_move_tail(&publ->cluster_list,
&info->cluster_list);
} else if (!list_empty(&info->zone_list)) {
} else {
publ = list_first_entry(&info->zone_list,
struct publication,
zone_list);
list_move_tail(&publ->zone_list,
&info->zone_list);
} else
goto no_match;
}
}
/* Round-Robin Algorithm: */
......@@ -598,8 +597,6 @@ u32 tipc_nametbl_translate(u32 type, u32 instance, u32 *destnode)
cluster_list);
list_move_tail(&publ->cluster_list, &info->cluster_list);
} else {
if (list_empty(&info->zone_list))
goto no_match;
publ = list_first_entry(&info->zone_list, struct publication,
zone_list);
list_move_tail(&publ->zone_list, &info->zone_list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册