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;
|
int cmp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (symtab == NULL)
|
||||||
|
{
|
||||||
|
DEBUGASSERT(nsyms == 0);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SYMTAB_DECORATED
|
#ifdef CONFIG_SYMTAB_DECORATED
|
||||||
if (name[0] == '_')
|
if (name[0] == '_')
|
||||||
{
|
{
|
||||||
@ -67,7 +73,7 @@ symtab_findbyname(FAR const struct symtab_s *symtab,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DEBUGASSERT(symtab != NULL && name != NULL);
|
DEBUGASSERT(name != NULL);
|
||||||
|
|
||||||
#ifdef CONFIG_SYMTAB_ORDEREDBYNAME
|
#ifdef CONFIG_SYMTAB_ORDEREDBYNAME
|
||||||
while (low < high)
|
while (low < high)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user