mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 06:50:52 +07:00
tipc: Optimize tipc_node_has_active_links()
Eliminate unnecessary checking for null node pointer and redundant check of second active link array entry. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
96d841b703
commit
76ae0d71d8
@ -237,8 +237,7 @@ void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr)
|
||||
|
||||
int tipc_node_has_active_links(struct tipc_node *n_ptr)
|
||||
{
|
||||
return (n_ptr &&
|
||||
((n_ptr->active_links[0]) || (n_ptr->active_links[1])));
|
||||
return n_ptr->active_links[0] != NULL;
|
||||
}
|
||||
|
||||
int tipc_node_has_redundant_links(struct tipc_node *n_ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user