summaryrefslogtreecommitdiff
path: root/lib/hashtable.c
diff options
context:
space:
mode:
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>2020-02-27 16:56:11 +0300
committerTom Rini <trini@konsulko.com>2020-04-24 17:09:59 +0300
commit34284970a1736e7be35bef74e4f8e429e703c1ce (patch)
treea1c3e2b156a0c02346fc8c387baaa65ef1e23c7d /lib/hashtable.c
parent7f529f6585cee9915e89b879acfaa3aaa05dec61 (diff)
downloadu-boot-34284970a1736e7be35bef74e4f8e429e703c1ce.tar.xz
lib/hashtable.c: don't test ->callback in SPL
In SPL, environment callbacks are not supported, so e->callback is always NULL. Removing this makes the SPL a little smaller (about 400 bytes in my ppc build) with no functional change. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/hashtable.c')
-rw-r--r--lib/hashtable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 574ec6af86..c4e1e2bd45 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -226,8 +226,10 @@ static int
do_callback(const struct env_entry *e, const char *name, const char *value,
enum env_op op, int flags)
{
+#ifndef CONFIG_SPL_BUILD
if (e->callback)
return e->callback(name, value, op, flags);
+#endif
return 0;
}