]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lib/hashtable.c: don't test ->callback in SPL
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 27 Feb 2020 13:56:11 +0000 (13:56 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 24 Apr 2020 14:09:59 +0000 (10:09 -0400)
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>
lib/hashtable.c

index 574ec6af8653dea2d9104367293e43979974cda0..c4e1e2bd45fbe07b020dc942e8c69b6a21bd3bf6 100644 (file)
@@ -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;
 }