From: David Gibson Date: Tue, 4 Apr 2017 13:46:44 +0000 (+1000) Subject: agar: Remove unnecessary NULL check X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=7e7a53d5ab61be8ef2387c030b18fea209676917;hp=5c1767485d0879cdacdfeed218f5e91cc2e9f716 agar: Remove unnecessary NULL check At this point the construction of the function above means that nn cannot be NULL. Found by Coverity Scan. Signed-off-by: David Gibson --- diff --git a/ccan/agar/agar.c b/ccan/agar/agar.c index aa462840..0baab325 100644 --- a/ccan/agar/agar.c +++ b/ccan/agar/agar.c @@ -59,7 +59,7 @@ static struct aga_node *nr_to_n(struct agar_state *sr, const void *nr) assert(rc); } - return nn ? &nn->n : NULL; + return &nn->n; } static const void *n_to_nr(struct agar_state *sr, const struct aga_node *n)