aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stand/common/load_elf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c
index d8fad9df994b..7454c550c7f2 100644
--- a/stand/common/load_elf.c
+++ b/stand/common/load_elf.c
@@ -1258,9 +1258,8 @@ __elfN(lookup_symbol)(elf_file_t ef, const char* name, Elf_Sym *symp,
strp = strdupout((vm_offset_t)(ef->strtab + sym.st_name));
if (strcmp(name, strp) == 0) {
free(strp);
- if (sym.st_shndx != SHN_UNDEF ||
- (sym.st_value != 0 &&
- ELF_ST_TYPE(sym.st_info) == type)) {
+ if (sym.st_shndx != SHN_UNDEF && sym.st_value != 0 &&
+ ELF_ST_TYPE(sym.st_info) == type) {
*symp = sym;
return 0;
}