summaryrefslogtreecommitdiff
path: root/common/dlmalloc.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-10-03 03:09:01 +0200
committerTom Rini <trini@konsulko.com>2023-10-11 10:35:24 -0400
commit2d307fb9ed2065cc1596a3c4263e55d1cae6799d (patch)
tree7aa01307b2f988d8de2505c2bbad1594ad7274f9 /common/dlmalloc.c
parent4860ee9b09e00ded5e9dfb5d418283dc2840bf1e (diff)
input: avoid NULL dereference
Before using the result of env_get("stdin") we must check if it is NULL. Avoid #if. This resolves the -Wunused-but-set-variable issue and we don't need a dummy assignment in the else branch. Anyway this warning is disabled in the Makefile. For sake of readability use an early return after the configuration check. Checking CONFIG_SPL_BUILD is incorrect as env_get() is only defined if CONFIG_$(SPL_TPL)ENV_SUPPORT=y. Fixes: 985ca3945fa3 ("spl: input: Allow input in SPL and TPL") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/dlmalloc.c')
0 files changed, 0 insertions, 0 deletions