diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-02 09:44:19 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-11 16:43:41 -0400 |
commit | 25e51e90feec10b7d534b123cd9c4ed7a3a2dc1a (patch) | |
tree | fc6dd40cf12d0e17ef95c9acf06d5357c002e336 /lib/hashtable.c | |
parent | dd2408cac1ea0f5e9ab4b07539c6edaee57918cb (diff) | |
download | u-boot-25e51e90feec10b7d534b123cd9c4ed7a3a2dc1a.tar.gz |
env: Drop _ENTRY
This typedef does not need to be defined in the search.h header since it
is only used in one file (hashtable.c). Remove it from the header and
change it to a struct.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/hashtable.c')
-rw-r--r-- | lib/hashtable.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c index c77b68f4e6..1093d8adaa 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -59,10 +59,10 @@ * which describes the current status. */ -typedef struct _ENTRY { +struct env_entry_node { int used; struct env_entry entry; -} _ENTRY; +}; static void _hdelete(const char *key, struct hsearch_data *htab, @@ -120,7 +120,8 @@ int hcreate_r(size_t nel, struct hsearch_data *htab) htab->filled = 0; /* allocate memory and zero out */ - htab->table = (_ENTRY *) calloc(htab->size + 1, sizeof(_ENTRY)); + htab->table = (struct env_entry_node *)calloc(htab->size + 1, + sizeof(struct env_entry_node)); if (htab->table == NULL) return 0; |