OpenDDLParser: latest greatest to get fix for coverity finding ( dereferenfing possible null ptr ).

This commit is contained in:
Kim Kulling
2016-01-08 16:46:13 +01:00
parent 430b614a69
commit 114d76765e
9 changed files with 315 additions and 98 deletions

View File

@@ -316,6 +316,16 @@ Value *Value::getNext() const {
return m_next;
}
size_t Value::size(){
size_t result=1;
Value *n=m_next;
while( n!=ddl_nullptr) {
result++;
n=n->m_next;
}
return result;
}
Value *ValueAllocator::allocPrimData( Value::ValueType type, size_t len ) {
if( type == Value::ddl_none || Value::ddl_types_max == type ) {
return ddl_nullptr;