#4172 libecl : Return std::string instead of NULL

libecl crashes when NULL is returned from a function returning std::string
This commit is contained in:
Magne Sjaastad 2019-03-05 21:10:39 +01:00
parent 11ae710be9
commit b120d0a2c1

View File

@ -188,7 +188,7 @@ std::string smspec_alloc_completion_ijk_key( const char * join_string , const st
join_string ,
i , j , k );
else
return NULL;
return std::string();
}
@ -202,7 +202,7 @@ std::string smspec_alloc_completion_num_key( const char * join_string , const st
join_string ,
num );
else
return NULL;
return std::string();
}
/*
@ -265,7 +265,7 @@ std::string smspec_alloc_segment_key( const char * join_string , const std::stri
join_string ,
num );
else
return NULL;
return std::string();
}
@ -278,7 +278,7 @@ std::string smspec_alloc_local_well_key( const char * join_string , const std::s
join_string ,
wgname.c_str());
else
return NULL;
return std::string();
}
std::string smspec_alloc_local_completion_key( const char * join_string, const std::string& keyword , const std::string& lgr_name , const std::string& wgname , int i , int j , int k) {
@ -292,7 +292,7 @@ std::string smspec_alloc_local_completion_key( const char * join_string, const s
join_string ,
i,j,k);
else
return NULL;
return std::string();
}
/*****************************************************************/