summaryrefslogtreecommitdiff
path: root/lib/hashtable.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-08-20 19:57:45 +0200
committerTom Rini <trini@konsulko.com>2020-10-12 21:30:37 -0400
commit34ca77c1e113d42a63f8ae21b41ec7f9f356c1de (patch)
tree8c47b6348dd5d6c890b381959fef26489602d7ad /lib/hashtable.c
parent6a0498a5fd41b58b0c61b34f315771aac0eca0e0 (diff)
downloadu-boot-34ca77c1e113d42a63f8ae21b41ec7f9f356c1de.tar.gz
u-boot-34ca77c1e113d42a63f8ae21b41ec7f9f356c1de.tar.bz2
u-boot-34ca77c1e113d42a63f8ae21b41ec7f9f356c1de.zip
lib/hashtable: remove superfluous check
We assign first_deleted = 0. There is no need to check its value without any further assignment in between. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/hashtable.c')
-rw-r--r--lib/hashtable.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 4a8c50b4b8..7c08f5c805 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -324,8 +324,7 @@ int hsearch_r(struct env_entry item, enum env_action action,
*/
unsigned hval2;
- if (htab->table[idx].used == USED_DELETED
- && !first_deleted)
+ if (htab->table[idx].used == USED_DELETED)
first_deleted = idx;
ret = _compare_and_overwrite_entry(item, action, retval, htab,