summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-05-30 11:27:50 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-06-24 16:18:16 -0400
commit8af4638a297b43c4929fdc01456b7f0698de0c0e (patch)
tree1a0e3bb9412630799755d9bcfe1ab170c6e21dde
parentf6f0a4d2d05f758f011a506731e84160d140304b (diff)
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: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--net/tipc/name_table.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 7d85cc1ace0e..46e6b6c2ecc9 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -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);