diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2010-08-17 11:00:12 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-18 00:31:57 (GMT) |
commit | 76ae0d71d839b365faa7fdca0eec85a6d1a20d95 (patch) | |
tree | d312821b3933522f18241eb313302fe8d723780f /net/tipc | |
parent | 96d841b7038b8091af3530a008793f5577337d3a (diff) | |
download | linux-fsl-qoriq-76ae0d71d839b365faa7fdca0eec85a6d1a20d95.tar.xz |
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>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/node.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index b634942..9408517 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -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) |