symtab_findbyvalue: just retun NULL for NULL symtab

This commit is contained in:
YAMAMOTO Takashi 2022-01-27 13:23:17 +09:00 committed by Petro Karashchenko
parent 0edb290951
commit dad4a7f8f7
1 changed files with 5 additions and 1 deletions

View File

@ -62,7 +62,11 @@ symtab_findbyvalue(FAR const struct symtab_s *symtab,
int low = 0;
#endif
DEBUGASSERT(symtab != NULL);
if (symtab == NULL)
{
DEBUGASSERT(nsyms == 0);
return NULL;
}
#ifdef CONFIG_SYMTAB_ORDEREDBYVALUE