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 --- test/env/hashtable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/env/hashtable.c b/test/env/hashtable.c index bad276b..5242c4c 100644 --- a/test/env/hashtable.c +++ b/test/env/hashtable.c @@ -28,7 +28,7 @@ static int htab_fill(struct unit_test_state *uts, item.data = key; item.flags = 0; item.key = key; - ut_asserteq(1, hsearch_r(item, ENTER, &ritem, htab, 0)); + ut_asserteq(1, hsearch_r(item, ENV_ENTER, &ritem, htab, 0)); } return 0; @@ -48,7 +48,7 @@ static int htab_check_fill(struct unit_test_state *uts, item.flags = 0; item.data = key; item.key = key; - hsearch_r(item, FIND, &ritem, htab, 0); + hsearch_r(item, ENV_FIND, &ritem, htab, 0); ut_assert(ritem); ut_asserteq_str(key, ritem->key); ut_asserteq_str(key, ritem->data); @@ -71,10 +71,10 @@ static int htab_create_delete(struct unit_test_state *uts, item.flags = 0; item.data = key; item.key = key; - hsearch_r(item, ENTER, &ritem, htab, 0); + hsearch_r(item, ENV_ENTER, &ritem, htab, 0); ritem = NULL; - hsearch_r(item, FIND, &ritem, htab, 0); + hsearch_r(item, ENV_FIND, &ritem, htab, 0); ut_assert(ritem); ut_asserteq_str(key, ritem->key); ut_asserteq_str(key, ritem->data); -- cgit v1.1