[Swan-dev] remove_list_entry()
D. Hugh Redelmeier
hugh at mimosa.com
Sun Jun 3 22:04:10 UTC 2018
Coverity Scan doesn't like this function.
Here's why:
if (older == NULL && newer == NULL)
implies that older or newer might be NULL
In the else clause, we know that they are not both NULL.
But we dereference each without checking, so that seems like a bug.
Perhaps the test should be
if (older == NULL || newer == NULL)
I don't know what the invariants are of the struct list_head
datastructure. Perhaps they should be documented.
More information about the Swan-dev
mailing list