You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/08 17:00:51 UTC
[GitHub] [incubator-nuttx] anchao commented on a change in pull request #5696: arch/sim: add all symbols support
anchao commented on a change in pull request #5696:
URL: https://github.com/apache/incubator-nuttx/pull/5696#discussion_r821874741
##########
File path: libs/libc/symtab/symtab_allsyms.c
##########
@@ -58,13 +58,16 @@ allsyms_lookup(FAR const char *name, FAR void *value,
symbol = symtab_findbyvalue(g_allsyms, value, g_nallsyms);
}
- if (symbol && symbol != &g_allsyms[g_nallsyms - 1])
+ if (size)
Review comment:
How about keep this style ? since there are other places in this file that do not use NULL checking
##########
File path: libs/libc/symtab/symtab_allsyms.c
##########
@@ -58,13 +58,16 @@ allsyms_lookup(FAR const char *name, FAR void *value,
symbol = symtab_findbyvalue(g_allsyms, value, g_nallsyms);
}
- if (symbol && symbol != &g_allsyms[g_nallsyms - 1])
+ if (size)
{
- *size = (symbol + 1)->sym_value - symbol->sym_value;
- }
- else
- {
- *size = 0;
+ if (symbol && symbol != &g_allsyms[g_nallsyms - 1])
Review comment:
How about keep this style ? since there are other places in this file that do not use NULL checking
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org