From 3f0d6807459bb22431e5bc19e597c1786b3d1ce6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:47:09 -0600 Subject: env: Drop the ACTION typedef Avoid using a typedef here which is unnecessary. Add an 'env_' prefix to both the enum and its members to make it clear that these are related to the environment. Add an ENV prefix to these two flags so that it is clear what they relate to. Also move them to env.h since they are part of the public API. Use an enum rather than a #define to tie them together. Signed-off-by: Simon Glass --- env/callback.c | 2 +- env/flags.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'env') diff --git a/env/callback.c b/env/callback.c index d539da9..d5469ce 100644 --- a/env/callback.c +++ b/env/callback.c @@ -98,7 +98,7 @@ static int set_callback(const char *name, const char *value, void *priv) e.key = name; e.data = NULL; e.callback = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENV_FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ if (ep != NULL) { diff --git a/env/flags.c b/env/flags.c index fdbad7b..93d337a 100644 --- a/env/flags.c +++ b/env/flags.c @@ -458,7 +458,7 @@ static int set_flags(const char *name, const char *value, void *priv) e.key = name; e.data = NULL; e.callback = NULL; - hsearch_r(e, FIND, &ep, &env_htab, 0); + hsearch_r(e, ENV_FIND, &ep, &env_htab, 0); /* does the env variable actually exist? */ if (ep != NULL) { -- cgit v1.1