mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 15:53:34 +08:00
Coverity CID 1268181, 1268182
This commit is contained in:
@@ -99,9 +99,9 @@ unsigned LinkedListRoot<T>::getLength() const
|
||||
template <typename T>
|
||||
void LinkedListRoot<T>::insert(T* node)
|
||||
{
|
||||
UAVCAN_ASSERT(node);
|
||||
if (node == NULL)
|
||||
{
|
||||
UAVCAN_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
remove(node); // Making sure there will be no loops
|
||||
@@ -113,9 +113,9 @@ template <typename T>
|
||||
template <typename Predicate>
|
||||
void LinkedListRoot<T>::insertBefore(T* node, Predicate predicate)
|
||||
{
|
||||
UAVCAN_ASSERT(node);
|
||||
if (node == NULL)
|
||||
{
|
||||
UAVCAN_ASSERT(0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user