projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c17674
)
agar: Remove unnecessary NULL check
author
David Gibson
<david@gibson.dropbear.id.au>
Tue, 4 Apr 2017 13:46:44 +0000
(23:46 +1000)
committer
David Gibson
<david@gibson.dropbear.id.au>
Wed, 5 Apr 2017 12:05:22 +0000
(22:05 +1000)
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>
ccan/agar/agar.c
patch
|
blob
|
history
diff --git
a/ccan/agar/agar.c
b/ccan/agar/agar.c
index aa4628404864affe29578122fb69f729f1a059c8..0baab325b58e678ba108e3fa2a09257ca92b6d86 100644
(file)
--- 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)