projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ecb092
)
tipc: Optimize null pointer check during neighbor discovery
author
Allan Stephens
<allan.stephens@windriver.com>
Wed, 21 May 2008 21:53:34 +0000
(14:53 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 21 May 2008 21:53:34 +0000
(14:53 -0700)
This patch optimizes TIPC neighbor discovery code to avoid testing for
a null node pointer when the pointer is already known to be non-null.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/discover.c
patch
|
blob
|
blame
|
history
diff --git
a/net/tipc/discover.c
b/net/tipc/discover.c
index 5d643e5721eb45ec36d3fb43d2f205e90f1ec5b5..faeaf06d377e13c3c6b185a46159c70526566847 100644
(file)
--- a/
net/tipc/discover.c
+++ b/
net/tipc/discover.c
@@
-200,9
+200,8
@@
void tipc_disc_recv_msg(struct sk_buff *buf)
dbg(" in own cluster\n");
if (n_ptr == NULL) {
n_ptr = tipc_node_create(orig);
- }
- if (n_ptr == NULL) {
- return;
+ if (!n_ptr)
+ return;
}
spin_lock_bh(&n_ptr->lock);
link = n_ptr->links[b_ptr->identity];