mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
treewide: Add ovs_assert
to check for null pointers.
This patch adds an assortment of `ovs_assert` statements to check for null pointers. We use assertions since it should be impossible for any of these pointers to be NULL. Reviewed-by: Simon Horman <simon.horman@corigine.com> Acked-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: James Raphael Tiovalen <jamestiotio@gmail.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
40546cd6e5
commit
bc79a7bf03
@@ -265,7 +265,7 @@ void *
|
||||
shash_find_and_delete_assert(struct shash *sh, const char *name)
|
||||
{
|
||||
void *data = shash_find_and_delete(sh, name);
|
||||
ovs_assert(data != NULL);
|
||||
ovs_assert(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user