diff options
author | Sultan Alsawaf <sultanxda@gmail.com> | 2017-05-30 12:55:04 -0700 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-31 05:35:34 +0200 |
commit | d5d5dcfa4bfc343e9d74d9c5c00ba79d8c57991d (patch) | |
tree | 3e916c58559f7c06fc9eb33e1eeba45b5efaac04 | |
parent | 72beb0e64a73f254dce72d509256d34842855c46 (diff) |
routingtable: Remove unnecessary check in node_placement()
node_placement() is always given the address of a stack variable for rnode,
so there's no need to check if rnode is null.
Signed-off-by: Sultan Alsawaf <sultanxda@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/routingtable.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/routingtable.c b/src/routingtable.c index f9c3eff..ce94a99 100644 --- a/src/routingtable.c +++ b/src/routingtable.c @@ -175,8 +175,7 @@ static inline bool node_placement(struct routing_table_node __rcu *trie, const u } node = rcu_dereference_protected(choose_node(parent, key), lockdep_is_held(lock)); } - if (rnode) - *rnode = parent; + *rnode = parent; return exact; } |