summaryrefslogtreecommitdiff
path: root/env/sf.c
diff options
context:
space:
mode:
Diffstat (limited to 'env/sf.c')
-rw-r--r--env/sf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/env/sf.c b/env/sf.c
index 590d0cedd8..16dba11578 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -284,14 +284,14 @@ out:
}
#endif
-#ifdef CONFIG_ENV_ADDR
+#if CONFIG_ENV_ADDR != 0x0
__weak void *env_sf_get_env_addr(void)
{
return (void *)CONFIG_ENV_ADDR;
}
#endif
-#if defined(INITENV) && defined(CONFIG_ENV_ADDR)
+#if defined(INITENV) && (CONFIG_ENV_ADDR != 0x0)
static int env_sf_init(void)
{
env_t *env_ptr = (env_t *)env_sf_get_env_addr();
@@ -315,7 +315,7 @@ U_BOOT_ENV_LOCATION(sf) = {
#ifdef CMD_SAVEENV
.save = env_save_ptr(env_sf_save),
#endif
-#if defined(INITENV) && defined(CONFIG_ENV_ADDR)
+#if defined(INITENV) && (CONFIG_ENV_ADDR != 0x0)
.init = env_sf_init,
#endif
};