mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
dd2408cac1
commit
25e51e90fe
2 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue