aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/allowedips.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-14 15:29:45 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-02-14 15:30:35 +0100
commitdb0e44139b6db098a6636eb5e6b74390af45dd3f (patch)
tree521f3921051d742f5e7e12ae3dbb5d0297f639c1 /src/allowedips.c
parentsocket: free skb if there isn't an endpoint (diff)
downloadwireguard-linux-compat-db0e44139b6db098a6636eb5e6b74390af45dd3f.tar.xz
wireguard-linux-compat-db0e44139b6db098a6636eb5e6b74390af45dd3f.zip
allowedips: indicate to clang-analyzer that trie is non-null
We check it in the block just above the only call to node_placement, so we're certain this is the case. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/allowedips.c')
-rw-r--r--src/allowedips.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/allowedips.c b/src/allowedips.c
index 2c91271..282b819 100644
--- a/src/allowedips.c
+++ b/src/allowedips.c
@@ -170,6 +170,7 @@ static __always_inline struct wireguard_peer *lookup(struct allowedips_node __rc
return peer;
}
+__attribute__((nonnull(1)))
static inline bool node_placement(struct allowedips_node __rcu *trie, const u8 *key, u8 cidr, u8 bits, struct allowedips_node **rnode, struct mutex *lock)
{
bool exact = false;