symtab_findbyname: just retun NULL for NULL symtab
The condition is not fatal at all. It's better to let the caller handle the failure.
This commit is contained in:
parent
4bd1bd177b
commit
0edb290951
|
@ -60,6 +60,12 @@ symtab_findbyname(FAR const struct symtab_s *symtab,
|
|||
int cmp;
|
||||
#endif
|
||||
|
||||
if (symtab == NULL)
|
||||
{
|
||||
DEBUGASSERT(nsyms == 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYMTAB_DECORATED
|
||||
if (name[0] == '_')
|
||||
{
|
||||
|
@ -67,7 +73,7 @@ symtab_findbyname(FAR const struct symtab_s *symtab,
|
|||
}
|
||||
#endif
|
||||
|
||||
DEBUGASSERT(symtab != NULL && name != NULL);
|
||||
DEBUGASSERT(name != NULL);
|
||||
|
||||
#ifdef CONFIG_SYMTAB_ORDEREDBYNAME
|
||||
while (low < high)
|
||||
|
|
Loading…
Reference in New Issue