Browse Source

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 <david@gibson.dropbear.id.au>
David Gibson 8 years ago
parent
commit
7e7a53d5ab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      ccan/agar/agar.c

+ 1 - 1
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)